about summary refs log tree commit diff stats
path: root/ui-refs.c
diff options
context:
space:
mode:
authorChristian Hesse2014-05-29 17:35:46 +0200
committerJason A. Donenfeld2014-06-28 15:14:56 +0200
commit79c985e13c10b498c3ea62f4607c2e2a460c3b10 (patch)
treed06ca41cfe2ebb5ff80ae747e38aeaad35734e35 /ui-refs.c
parentremove trailing whitespaces from source files (diff)
downloadcgit-79c985e13c10b498c3ea62f4607c2e2a460c3b10.tar.gz
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-refs.c')
-rw-r--r--ui-refs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui-refs.c b/ui-refs.c index 0da063f..7e58737 100644 --- a/ui-refs.c +++ b/ui-refs.c
@@ -101,7 +101,7 @@ static void print_tag_downloads(const struct cgit_repo *repo, const char *ref)
101 return; 101 return;
102 102
103 basename = cgit_repobasename(repo->url); 103 basename = cgit_repobasename(repo->url);
104 if (prefixcmp(ref, basename) != 0) { 104 if (!starts_with(ref, basename)) {
105 if ((ref[0] == 'v' || ref[0] == 'V') && isdigit(ref[1])) 105 if ((ref[0] == 'v' || ref[0] == 'V') && isdigit(ref[1]))
106 ref++; 106 ref++;
107 if (isdigit(ref[0])) { 107 if (isdigit(ref[0])) {
@@ -239,9 +239,9 @@ void cgit_print_refs()
239 239
240 html("<table class='list nowrap'>"); 240 html("<table class='list nowrap'>");
241 241
242 if (ctx.qry.path && !prefixcmp(ctx.qry.path, "heads")) 242 if (ctx.qry.path && starts_with(ctx.qry.path, "heads"))
243 cgit_print_branches(0); 243 cgit_print_branches(0);
244 else if (ctx.qry.path && !prefixcmp(ctx.qry.path, "tags")) 244 else if (ctx.qry.path && starts_with(ctx.qry.path, "tags"))
245 cgit_print_tags(0); 245 cgit_print_tags(0);
246 else { 246 else {
247 cgit_print_branches(0); 247 cgit_print_branches(0);