git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] repack: rewrite the shell script in C

From
Stefan Beller <stefanbeller@googlemail.com>
Date
Sep 17, 2013, 20:15 UTC
Message-ID
<5238B845.5080603@googlemail.com>
In-Reply-To
<5235D2D0.9030203@googlemail.com>
On 09/15/2013 05:31 PM, Stefan Beller wrote:
> Rene, thank you very much for the review!
Show 9 quoted lines
> 
> 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@googlemail.com>
Date: Tue, 17 Sep 2013 22:04:14 +0200
Subject: [PATCH 1/2] Fixup missing by Rene.
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
---
 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
Previous: Stefan BellerNext: Stefan Beller
Message 6 of 9 in “[PATCHv7 0/2] Rewriting repack in C”
  1. Stefan BellerAug 29, 2013
  2. 1/2 repack: rewrite the shell script in CStefan Beller, Aug 29, 2013
  3. Felipe ContrerasAug 29, 2013
  4. René ScharfeSep 15, 2013
  5. Stefan BellerSep 15, 2013
  6. Stefan BellerSep 17, 2013
  7. 2/2 repack: retain the return value of pack-objectsStefan Beller, Aug 29, 2013
  8. Junio C HamanoAug 29, 2013
  9. Stefan BellerAug 30, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.