log of tags

Lukas Fleischer cgit at cryptocrack.de
Thu Jan 15 18:27:50 CET 2015


On Thu, 15 Jan 2015 at 17:18:02, Ferry Huberts wrote:
> Hi
> 
> Just noticed this:
> You can't show the log of a tag when that tag is not on a branch, which 
> happen to me a lot for expired maintenance branches.
> 
> Sound familiar?
> 
> How to fix?
> Include a 'log' line, like the 'Tagged object' line?
> Or just make clicking on the log 'tab' do the right thing? (it currently 
> just shows the log of the default branch)
> [...]

Making the "log" link point to the log of the currently selected commit
is easy but I do not know whether that is what we want to do. It is a
convenient way to navigate back to the "full" log and I think this is
what most users would expect. Note that you can always manually append
"?id=$tag" to the log URI which is what I sometimes do when posting
links to the log of a release somewhere.

Anyway, if you still want the "make clicking on the log 'tab' do the
right thing" behavior, try this (untested):

-- >8 --
diff --git a/ui-shared.c b/ui-shared.c
index 32f23f9..2eb0d4e 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -928,7 +928,7 @@ void cgit_print_pageheader(void)
 		cgit_refs_link("refs", NULL, hc("refs"), ctx.qry.head,
 			       ctx.qry.sha1, NULL);
 		cgit_log_link("log", NULL, hc("log"), ctx.qry.head,
-			      NULL, ctx.qry.vpath, 0, NULL, NULL,
+			      ctx.qry.sha1, ctx.qry.vpath, 0, NULL, NULL,
 			      ctx.qry.showmsg);
 		cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head,
 			       ctx.qry.sha1, ctx.qry.vpath);


More information about the CGit mailing list