diff options
Diffstat (limited to 'ui-log.c')
-rw-r--r-- | ui-log.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -63,21 +63,21 @@ void show_commit_decorations(struct commit *commit) | |||
63 | deco = lookup_decoration(&name_decoration, &commit->object); | 63 | deco = lookup_decoration(&name_decoration, &commit->object); |
64 | html("<span class='decoration'>"); | 64 | html("<span class='decoration'>"); |
65 | while (deco) { | 65 | while (deco) { |
66 | if (!prefixcmp(deco->name, "refs/heads/")) { | 66 | if (starts_with(deco->name, "refs/heads/")) { |
67 | strncpy(buf, deco->name + 11, sizeof(buf) - 1); | 67 | strncpy(buf, deco->name + 11, sizeof(buf) - 1); |
68 | cgit_log_link(buf, NULL, "branch-deco", buf, NULL, | 68 | cgit_log_link(buf, NULL, "branch-deco", buf, NULL, |
69 | ctx.qry.vpath, 0, NULL, NULL, | 69 | ctx.qry.vpath, 0, NULL, NULL, |
70 | ctx.qry.showmsg); | 70 | ctx.qry.showmsg); |
71 | } | 71 | } |
72 | else if (!prefixcmp(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", ctx.qry.head, buf); |
75 | } | 75 | } |
76 | else if (!prefixcmp(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", ctx.qry.head, buf); |
79 | } | 79 | } |
80 | else if (!prefixcmp(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) |
82 | goto next; | 82 | goto next; |
83 | strncpy(buf, deco->name + 13, sizeof(buf) - 1); | 83 | strncpy(buf, deco->name + 13, sizeof(buf) - 1); |