summary refs log tree commit diff
path: root/ui-log.c
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2014-05-29 17:35:46 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2014-06-28 15:14:56 +0200
commit79c985e13c10b498c3ea62f4607c2e2a460c3b10 (patch)
treed06ca41cfe2ebb5ff80ae747e38aeaad35734e35 /ui-log.c
parentb431282c91deea24916578395d88084261410968 (diff)
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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui-log.c b/ui-log.c
index 499534c..2de8017 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -63,21 +63,21 @@ void show_commit_decorations(struct commit *commit)
 	deco = lookup_decoration(&name_decoration, &commit->object);
 	html("<span class='decoration'>");
 	while (deco) {
-		if (!prefixcmp(deco->name, "refs/heads/")) {
+		if (starts_with(deco->name, "refs/heads/")) {
 			strncpy(buf, deco->name + 11, sizeof(buf) - 1);
 			cgit_log_link(buf, NULL, "branch-deco", buf, NULL,
 				      ctx.qry.vpath, 0, NULL, NULL,
 				      ctx.qry.showmsg);
 		}
-		else if (!prefixcmp(deco->name, "tag: refs/tags/")) {
+		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);
 		}
-		else if (!prefixcmp(deco->name, "refs/tags/")) {
+		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);
 		}
-		else if (!prefixcmp(deco->name, "refs/remotes/")) {
+		else if (starts_with(deco->name, "refs/remotes/")) {
 			if (!ctx.repo->enable_remote_branches)
 				goto next;
 			strncpy(buf, deco->name + 13, sizeof(buf) - 1);