From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Cc: Johannes.Schindelin@gmx.de, dstolee@microsoft.com,
jeffhost@microsoft.com, peff@peff.net
Subject: [PATCH 3/4] midx.c: lookup MIDX by object directory during repack
Date: Fri, 8 Oct 2021 17:46:35 -0400 [thread overview]
Message-ID: <0accab9139e095c10bf6f299b77bab048e2b4c77.1633729502.git.me@ttaylorr.com> (raw)
In-Reply-To: <cover.1633729502.git.me@ttaylorr.com>
Apply similar treatment as in the last commit to the MIDX `repack`
operation.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
midx.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/midx.c b/midx.c
index 7f1addf4b6..137af3fc67 100644
--- a/midx.c
+++ b/midx.c
@@ -1872,7 +1872,7 @@ int midx_repack(struct repository *r, const char *object_dir, size_t batch_size,
struct child_process cmd = CHILD_PROCESS_INIT;
FILE *cmd_in;
struct strbuf base_name = STRBUF_INIT;
- struct multi_pack_index *m = load_multi_pack_index(object_dir, 1);
+ struct multi_pack_index *m = lookup_multi_pack_index(r, object_dir);
/*
* When updating the default for these configuration
@@ -1944,11 +1944,8 @@ int midx_repack(struct repository *r, const char *object_dir, size_t batch_size,
}
result = write_midx_internal(object_dir, NULL, NULL, NULL, NULL, flags);
- m = NULL;
cleanup:
- if (m)
- close_midx(m);
free(include_pack);
return result;
}
--
2.33.0.96.g73915697e6
next prev parent reply other threads:[~2021-10-08 21:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-08 21:46 [PATCH 0/4] midx: avoid potential rename-while-mapped on Windows Taylor Blau
2021-10-08 21:46 ` [PATCH 1/4] midx.c: extract MIDX lookup by object_dir Taylor Blau
2021-10-08 21:46 ` [PATCH 2/4] midx.c: lookup MIDX by object directory during expire Taylor Blau
2021-10-13 13:28 ` Derrick Stolee
2021-10-08 21:46 ` Taylor Blau [this message]
2021-10-08 21:46 ` [PATCH 4/4] midx.c: guard against commit_lock_file() failures Taylor Blau
2021-10-09 2:07 ` Ævar Arnfjörð Bjarmason
2021-10-13 13:29 ` [PATCH 0/4] midx: avoid potential rename-while-mapped on Windows Derrick Stolee
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0accab9139e095c10bf6f299b77bab048e2b4c77.1633729502.git.me@ttaylorr.com \
--to=me@ttaylorr.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=jeffhost@microsoft.com \
--cc=peff@peff.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).