From 72071ed7ee36bbd6e1752784621a7231481cddd6 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 13:22:23 -0700 Subject: Name a listed pack with git's own pack_basename --- source/ui-clone.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'source/ui-clone.c') 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 @@ -37,19 +37,6 @@ static int print_ref(const struct reference *ref, void *cb_data UNUSED) return 0; } -/* - * 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 @@ -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)); } } } -- cgit