diff options
author | John Keeping <john@keeping.me.uk> | 2015-01-15 23:18:14 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2015-01-19 17:52:10 +0100 |
commit | c422b9b3d5938a4d386533604d4c0dbedfcb2b6d (patch) | |
tree | df512e44809bf0e34ca80a8d57a6fc74482007d9 /ui-log.c | |
parent | ed7e3bc822856c30066a4ff0178033b22046fe96 (diff) | |
download | cgit-c422b9b3d5938a4d386533604d4c0dbedfcb2b6d.tar.gz cgit-c422b9b3d5938a4d386533604d4c0dbedfcb2b6d.tar.xz |
tag: reference with "h" instead of "id"master
When clicking on "log" from a tag we end up showing the log of whatever
branch we used to reach the tag. If the tag doesn't point onto a branch
then the tagged commit won't appear in this output.
By linking to tags with the head parameter instead of the "id" parameter
the log link will show the log of the tag. This is clearly desirable
when the tag has been reached from the refs UI and changing the
behaviour for tag decorations makes them match branch decorations where
log -> decoration -> log shows the log of the decoration.
Reported-by: Ferry Huberts <mailings@hupie.com>
Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'ui-log.c')
-rw-r--r-- | ui-log.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -71,11 +71,11 @@ void show_commit_decorations(struct commit *commit) } else if (starts_with(deco->name, "tag: refs/tags/")) { strncpy(buf, deco->name + 15, sizeof(buf) - 1); - cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf); + cgit_tag_link(buf, NULL, "tag-deco", buf); } else if (starts_with(deco->name, "refs/tags/")) { strncpy(buf, deco->name + 10, sizeof(buf) - 1); - cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf); + cgit_tag_link(buf, NULL, "tag-deco", buf); } else if (starts_with(deco->name, "refs/remotes/")) { if (!ctx.repo->enable_remote_branches) |