diff options
-rw-r--r-- | ui-log.c | 4 | ||||
-rw-r--r-- | ui-refs.c | 2 | ||||
-rw-r--r-- | ui-shared.c | 8 | ||||
-rw-r--r-- | ui-shared.h | 3 |
4 files changed, 8 insertions, 9 deletions
@@ -71,11 +71,11 @@ void show_commit_decorations(struct commit *commit) | |||
71 | } | 71 | } |
72 | else if (starts_with(deco->name, "tag: refs/tags/")) { | 72 | else if (starts_with(deco->name, "tag: refs/tags/")) { |
73 | strncpy(buf, deco->name + 15, sizeof(buf) - 1); | 73 | strncpy(buf, deco->name + 15, sizeof(buf) - 1); |
74 | cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf); | 74 | cgit_tag_link(buf, NULL, "tag-deco", buf); |
75 | } | 75 | } |
76 | else if (starts_with(deco->name, "refs/tags/")) { | 76 | else if (starts_with(deco->name, "refs/tags/")) { |
77 | strncpy(buf, deco->name + 10, sizeof(buf) - 1); | 77 | strncpy(buf, deco->name + 10, sizeof(buf) - 1); |
78 | cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf); | 78 | cgit_tag_link(buf, NULL, "tag-deco", buf); |
79 | } | 79 | } |
80 | else if (starts_with(deco->name, "refs/remotes/")) { | 80 | else if (starts_with(deco->name, "refs/remotes/")) { |
81 | if (!ctx.repo->enable_remote_branches) | 81 | if (!ctx.repo->enable_remote_branches) |
@@ -140,7 +140,7 @@ static int print_tag(struct refinfo *ref) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | html("<tr><td>"); | 142 | html("<tr><td>"); |
143 | cgit_tag_link(name, NULL, NULL, ctx.qry.head, name); | 143 | cgit_tag_link(name, NULL, NULL, name); |
144 | html("</td><td>"); | 144 | html("</td><td>"); |
145 | if (ctx.repo->snapshots && (obj->type == OBJ_COMMIT)) | 145 | if (ctx.repo->snapshots && (obj->type == OBJ_COMMIT)) |
146 | print_tag_downloads(ctx.repo, name); | 146 | print_tag_downloads(ctx.repo, name); |
diff --git a/ui-shared.c b/ui-shared.c index 32f23f9..d8cc4d7 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -273,9 +273,9 @@ void cgit_summary_link(const char *name, const char *title, const char *class, | |||
273 | } | 273 | } |
274 | 274 | ||
275 | void cgit_tag_link(const char *name, const char *title, const char *class, | 275 | void cgit_tag_link(const char *name, const char *title, const char *class, |
276 | const char *head, const char *rev) | 276 | const char *tag) |
277 | { | 277 | { |
278 | reporevlink("tag", name, title, class, head, rev, NULL); | 278 | reporevlink("tag", name, title, class, tag, NULL, NULL); |
279 | } | 279 | } |
280 | 280 | ||
281 | void cgit_tree_link(const char *name, const char *title, const char *class, | 281 | void cgit_tree_link(const char *name, const char *title, const char *class, |
@@ -443,8 +443,8 @@ static void cgit_self_link(char *name, const char *title, const char *class) | |||
443 | else if (!strcmp(ctx.qry.page, "summary")) | 443 | else if (!strcmp(ctx.qry.page, "summary")) |
444 | cgit_summary_link(name, title, class, ctx.qry.head); | 444 | cgit_summary_link(name, title, class, ctx.qry.head); |
445 | else if (!strcmp(ctx.qry.page, "tag")) | 445 | else if (!strcmp(ctx.qry.page, "tag")) |
446 | cgit_tag_link(name, title, class, ctx.qry.head, | 446 | cgit_tag_link(name, title, class, ctx.qry.has_sha1 ? |
447 | ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL); | 447 | ctx.qry.sha1 : ctx.qry.head); |
448 | else if (!strcmp(ctx.qry.page, "tree")) | 448 | else if (!strcmp(ctx.qry.page, "tree")) |
449 | cgit_tree_link(name, title, class, ctx.qry.head, | 449 | cgit_tree_link(name, title, class, ctx.qry.head, |
450 | ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL, | 450 | ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL, |
diff --git a/ui-shared.h b/ui-shared.h index f8cf220..021fe4e 100644 --- a/ui-shared.h +++ b/ui-shared.h | |||
@@ -18,8 +18,7 @@ extern void cgit_index_link(const char *name, const char *title, | |||
18 | extern void cgit_summary_link(const char *name, const char *title, | 18 | extern void cgit_summary_link(const char *name, const char *title, |
19 | const char *class, const char *head); | 19 | const char *class, const char *head); |
20 | extern void cgit_tag_link(const char *name, const char *title, | 20 | extern void cgit_tag_link(const char *name, const char *title, |
21 | const char *class, const char *head, | 21 | const char *class, const char *tag); |
22 | const char *rev); | ||
23 | extern void cgit_tree_link(const char *name, const char *title, | 22 | extern void cgit_tree_link(const char *name, const char *title, |
24 | const char *class, const char *head, | 23 | const char *class, const char *head, |
25 | const char *rev, const char *path); | 24 | const char *rev, const char *path); |