tag: reference with "h" instead of "id"

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>
这个提交包含在:
John Keeping
2015-01-15 22:18:14 +00:00
提交者 Jason A. Donenfeld
父节点 ed7e3bc822
当前提交 c422b9b3d5
共有 4 个文件被更改,包括 8 次插入9 次删除

查看文件

@@ -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);
html("</td><td>");
if (ctx.repo->snapshots && (obj->type == OBJ_COMMIT))
print_tag_downloads(ctx.repo, name);