"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
gotwebd: make the commit page more like got log and tog
To:
gameoftrees@openbsd.org
Date:
Tue, 10 Jan 2023 15:14:17 +0100

Download raw body.

Thread
syncing gotwebd with `tog' and `got log'.  I'm running with this on my
instance, here's an example of how it looks:

http://git.omarpolo.com/?action=diff&commit=587550a5041e8aba39cd1338a22e85b6405d879f&headref=HEAD&path=got.git
(author == committer)

or

http://git.omarpolo.com/?action=diff&commit=0b3f028dffa4ecc7aa72dc9132d53e9d056cc36f&headref=HEAD&path=got.git
(author != committer)

I don't think it's very useful to show the tree id.  It's also
rendered in the blob page; if this is ok i'll drop it from there too.

-----------------------------------------------
commit 1bdce15e3cdcbc762bb116312508182c0d575fe1 (main)
from: Omar Polo <op@omarpolo.com>
date: Tue Jan 10 14:08:37 2023 UTC
 
 gotwebd: make commit page more like `got log' / tog
 
 - drop the "diff commit1 commit2" header; it's already showed in the
   body of the diff.
 - hide the tree id (not that useful to show.)
 - show the committer if different from the author.
 - use From/Via for Committer/Author.
 
diff 2e6043e87514d1a49e1c8a037d7c4e20869b07ad 1bdce15e3cdcbc762bb116312508182c0d575fe1
commit - 2e6043e87514d1a49e1c8a037d7c4e20869b07ad
commit + 1bdce15e3cdcbc762bb116312508182c0d575fe1
blob - 6a5d354e145ae61a1ae18f8936f735573508bd28
blob + c8f7a859f74578199b84566a25e7a1b31a3717d9
--- gotwebd/files/htdocs/gotwebd/gotweb.css
+++ gotwebd/files/htdocs/gotwebd/gotweb.css
@@ -228,20 +228,6 @@ body {
 	padding-top: 2px;
 	padding-bottom: 2px;
 }
-#header_diff_title {
-	clear: left;
-	float: left;
-	width: 6.5em;
-	padding-left: 10px;
-	padding-top: 2px;
-	padding-bottom: 2px;
-}
-#header_diff {
-	float: left;
-	width: 72%;
-	padding-top: 2px;
-	padding-bottom: 2px;
-}
 .header_author_title {
 	clear: left;
 	float: left;
blob - db75509aef099d948964c7a1a20115f27e7e63ed
blob + 3265456df058f025cd052df66cbffdcff9b45932
--- gotwebd/pages.tmpl
+++ gotwebd/pages.tmpl
@@ -708,18 +708,14 @@ gotweb_render_age(struct template *tp, time_t time, in
 <div id="diff_content">
   <div id="diff_header_wrapper">
     <div id="diff_header">
-      <div id="header_diff_title">Diff:</div>
-      <div id="header_diff">
-        {{ rc->parent_id }}
-        <br />
-        {{ rc->commit_id }}
-      </div>
       <div class="header_commit_title">Commit:</div>
       <div class="header_commit">{{ rc->commit_id }}</div>
-      <div id="header_tree_title">Tree:</div>
-      <div id="header_tree">{{ rc->tree_id }}</div>
-      <div class="header_author_title">Author:</div>
+      <div class="header_author_title">From:</div>
       <div class="header_author">{{ rc->author }}</div>
+      {{ if strcmp(rc->committer, rc->author) != 0 }}
+        <div class="header_author_title">Via:</div>
+        <div class="header_author">{{ rc->committer }}</div>
+      {{ end }}
       <div class="header_age_title">Date:</div>
       <div class="header_age">
         {{ render gotweb_render_age(tp, rc->committer_time, TM_LONG) }}