log of tags

John Keeping john at keeping.me.uk
Thu Jan 15 22:55:31 CET 2015


On Thu, Jan 15, 2015 at 06:27:50PM +0100, Lukas Fleischer wrote:
> 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):

I think we actually want something like this:

-- >8 --
diff --git a/ui-refs.c b/ui-refs.c
index bdd3b2c..d3017ec 100644
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -140,7 +140,7 @@ static int print_tag(struct refinfo *ref)
 	}
 
 	html("<tr><td>");
-	cgit_tag_link(name, NULL, NULL, ctx.qry.head, name);
+	cgit_tag_link(name, NULL, NULL, name, NULL);
 	html("</td><td>");
 	if (ctx.repo->snapshots && (obj->type == OBJ_COMMIT))
 		print_tag_downloads(ctx.repo, name);
-- 8< --

The tag UI already does the right thing if we use "h" instead of "id".

The only thing I'm not sure about is whether we should change all tag
links to behave like this.  That would make tag decorations consistent
with branch decorations which already change the head, so I think that
is the way to go.


More information about the CGit mailing list