On 09/15/2013 05:31 PM, Stefan Beller wrote: > Rene, thank you very much for the review! > > the parameter hex contains the "pack-" already. > The remove_redundant_pack function is called in a loop iterating over > elements of existing_packs, which is filled in get_non_kept_pack_filenames, > which doesn't fill in the hex, but filenames without extension. > > I'll rename the variables to base_name and dir_name as you suggested. > > I did write a lengthy paragraph, but forgot to actually to it. ---8<--- From 92af79a5a89929d8834ff6d585c0455c867a774f Mon Sep 17 00:00:00 2001 From: Stefan Beller <stefanbeller@xxxxxxxxxxxxxx> Date: Tue, 17 Sep 2013 22:04:14 +0200 Subject: [PATCH 1/2] Fixup missing by Rene. Signed-off-by: Stefan Beller <stefanbeller@xxxxxxxxxxxxxx> --- builtin/repack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/repack.c b/builtin/repack.c index f7e91bf..e5f90c6 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -92,14 +92,14 @@ static void get_non_kept_pack_filenames(struct string_list *fname_list) closedir(dir); } -static void remove_redundant_pack(const char *path_prefix, const char *hex) +static void remove_redundant_pack(const char *dir_name, const char *base_name) { const char *exts[] = {".pack", ".idx", ".keep"}; int i; struct strbuf buf = STRBUF_INIT; size_t plen; - strbuf_addf(&buf, "%s/%s", path_prefix, hex); + strbuf_addf(&buf, "%s/%s", dir_name, base_name); plen = buf.len; for (i = 0; i < ARRAY_SIZE(exts); i++) { -- 1.8.4.273.ga194ead
Attachment:
signature.asc
Description: OpenPGP digital signature