git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Neeraj Singh via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes.Schindelin@gmx.de,
	"Neeraj K. Singh" <neerajsi@microsoft.com>,
	Neeraj Singh <neerajsi@microsoft.com>
Subject: [PATCH 1/2] fixup! tmp-objdir: new API for creating temporary writable databases
Date: Tue, 26 Oct 2021 22:35:29 +0000	[thread overview]
Message-ID: <d244cc4bb60959b8f3d8711a7aeb434efcc9d2a2.1635287730.git.gitgitgadget@gmail.com> (raw)
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


  reply	other threads:[~2021-10-26 22:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26 22:35 [PATCH 0/2] tmp-objdir: fix regressions in core.fsyncobjectfiles=batch Neeraj K. Singh via GitGitGadget
2021-10-26 22:35 ` Neeraj Singh via GitGitGadget [this message]
2021-10-26 22:35 ` [PATCH 2/2] fixup! tmp-objdir: new API for creating temporary writable databases Neeraj Singh via GitGitGadget
2021-10-27 12:44 ` [PATCH 0/2] tmp-objdir: fix regressions in core.fsyncobjectfiles=batch Johannes Schindelin
2021-10-27 21:09   ` Junio C Hamano
2021-10-27 22:57     ` Neeraj Singh
2021-10-28  0:30       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d244cc4bb60959b8f3d8711a7aeb434efcc9d2a2.1635287730.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=neerajsi@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).