diff options
author | Christian Hesse <mail@eworm.de> | 2014-05-29 17:35:46 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-06-28 15:14:56 +0200 |
commit | 79c985e13c10b498c3ea62f4607c2e2a460c3b10 (patch) | |
tree | d06ca41cfe2ebb5ff80ae747e38aeaad35734e35 /ui-refs.c | |
parent | b431282c91deea24916578395d88084261410968 (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 '')
-rw-r--r-- | ui-refs.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -101,7 +101,7 @@ static void print_tag_downloads(const struct cgit_repo *repo, const char *ref) return; basename = cgit_repobasename(repo->url); - if (prefixcmp(ref, basename) != 0) { + if (!starts_with(ref, basename)) { if ((ref[0] == 'v' || ref[0] == 'V') && isdigit(ref[1])) ref++; if (isdigit(ref[0])) { @@ -239,9 +239,9 @@ void cgit_print_refs() html("<table class='list nowrap'>"); - if (ctx.qry.path && !prefixcmp(ctx.qry.path, "heads")) + if (ctx.qry.path && starts_with(ctx.qry.path, "heads")) cgit_print_branches(0); - else if (ctx.qry.path && !prefixcmp(ctx.qry.path, "tags")) + else if (ctx.qry.path && starts_with(ctx.qry.path, "tags")) cgit_print_tags(0); else { cgit_print_branches(0); |