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

[PATCH 1/2] fixup! tmp-objdir: new API for creating temporary writable databases

From
NGNeeraj Singh via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 26, 2021, 22:35 UTC
Message-ID
<d244cc4bb60959b8f3d8711a7aeb434efcc9d2a2.1635287730.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1067.git.1635287730.gitgitgadget@gmail.com>
From: Neeraj Singh <neerajsi@microsoft.com>

Fix prune code to be able to delete multiple object directories. I wasn't properly resetting the strbuf with the path.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
---
 builtin/prune.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/builtin/prune.c b/builtin/prune.c
index 9c72ecf5a58..6b6b0c7b011 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -31,6 +31,7 @@ static int prune_tmp_file(const char *fullpath)
 		if (show_only || verbose)
 			printf("Removing stale temporary directory %s\n", fullpath);
 		if (!show_only) {
+			strbuf_reset(&remove_dir_buf);
 			strbuf_addstr(&remove_dir_buf, fullpath);
 			remove_dir_recursively(&remove_dir_buf, 0);
 		}
-- 
gitgitgadget
Previous: Neeraj K. Singh via GitGitGadgetNext: Neeraj Singh via GitGitGadget
Message 2 of 7 in “tmp-objdir: fix regressions in core.fsyncobjectfiles=batch”
  1. 0/2 tmp-objdir: fix regressions in core.fsyncobjectfiles=batchNeeraj K. Singh via GitGitGadget, Oct 26, 2021
  2. 1/2 fixup! tmp-objdir: new API for creating temporary writable databasesNeeraj Singh via GitGitGadget, Oct 26, 2021
  3. 2/2 fixup! tmp-objdir: new API for creating temporary writable databasesNeeraj Singh via GitGitGadget, Oct 26, 2021
  4. Johannes SchindelinOct 27, 2021
  5. Junio C HamanoOct 27, 2021
  6. Neeraj SinghOct 27, 2021
  7. Junio C HamanoOct 28, 2021

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.