diff options
Diffstat (limited to 'ui-refs.c')
| -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) | |||
| 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); |
