diff options
author | Christian Hesse | 2014-05-29 17:35:46 +0200 |
---|---|---|
committer | Jason A. Donenfeld | 2014-06-28 15:14:56 +0200 |
commit | 79c985e13c10b498c3ea62f4607c2e2a460c3b10 (patch) | |
tree | d06ca41cfe2ebb5ff80ae747e38aeaad35734e35 /ui-log.c | |
parent | b431282c91deea24916578395d88084261410968 (diff) | |
download | cgit-79c985e13c10b498c3ea62f4607c2e2a460c3b10.tar.gz cgit-79c985e13c10b498c3ea62f4607c2e2a460c3b10.tar.bz2 cgit-79c985e13c10b498c3ea62f4607c2e2a460c3b10.zip |
git: update for git 2.0
prefixcmp() and suffixcmp() have been remove, functionality is now
provided by starts_with() and ends_with(). Retrurn values have been
changed, so instead of just renaming we have to fix logic.
Everything else looks just fine.
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); |