From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Thu, 15 Jan 2015 21:55:31 +0000 Subject: log of tags In-Reply-To: <20150115172750.10348.53323@typhoon.lan> References: <54B7E83A.5010309@hupie.com> <20150115172750.10348.53323@typhoon.lan> Message-ID: <20150115215531.GH26383@serenity.lan> 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(""); - cgit_tag_link(name, NULL, NULL, ctx.qry.head, name); + cgit_tag_link(name, NULL, NULL, name, NULL); html(""); 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.