Diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/ui-clone.c | 15 |
1 file changed, 1 insertion, 14 deletions
diff --git a/source/ui-clone.c b/source/ui-clone.c index dad21d5..8f3439e 100644 --- a/source/ui-clone.c +++ b/source/ui-clone.c @@ -38,19 +38,6 @@ static int print_ref(const struct reference *ref, void *cb_data UNUSED) } /* - * A path ending in a slash is handed back whole, where git's own - * pack_basename would return the empty string. - */ -static const char *last_path_component(const char *path) -{ - const char *slash = strrchr(path, '/'); - - if (slash && slash[1] != '\0') - return slash + 1; - return path; -} - -/* * Only the packs this repository holds itself are listed, because one * borrowed from an alternate is not reachable below this URL and a client * told about it would come back for a file that is not there. @@ -74,7 +61,7 @@ static void print_pack_info(void) struct packed_git *pack = entry->pack; if (pack->pack_local) - htmlf("P %s\n", last_path_component(pack->pack_name)); + htmlf("P %s\n", pack_basename(pack)); } } } |
