List for cgit developers and users
 help / color / mirror / Atom feed
From: john at keeping.me.uk (John Keeping)
Subject: log of tags
Date: Thu, 15 Jan 2015 21:55:31 +0000	[thread overview]
Message-ID: <20150115215531.GH26383@serenity.lan> (raw)
In-Reply-To: <20150115172750.10348.53323@typhoon.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("<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.


  reply	other threads:[~2015-01-15 21:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-15 16:18 mailings
2015-01-15 17:27 ` cgit
2015-01-15 21:55   ` john [this message]
2015-01-15 22:18     ` [PATCH] tag: reference with "h" instead of "id" john
2015-01-15 22:23       ` mailings
2015-01-19 16:52       ` Jason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150115215531.GH26383@serenity.lan \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).