Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/midx.h
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-10-12 20:34:19 +0300
committerJunio C Hamano <gitster@pobox.com>2018-10-22 04:42:46 +0300
commit1dcd9f2043a38f0c9684d47c71b9e383942660ac (patch)
treeccc137d372ff6f1d4a6285f7448ac7f5e465eba3 /midx.h
parent0ce4ff942125eabed3df694dc27922bec8177624 (diff)
midx: close multi-pack-index on repack
When repacking, we may remove pack-files. This invalidates the multi-pack-index (if it exists). Previously, we removed the multi-pack-index file before removing any pack-file. In some cases, the repack command may load the multi-pack-index into memory. This may lead to later in-memory references to the non-existent pack- files. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'midx.h')
-rw-r--r--midx.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/midx.h b/midx.h
index a210f1af2a..7e60907596 100644
--- a/midx.h
+++ b/midx.h
@@ -42,6 +42,8 @@ int midx_contains_pack(struct multi_pack_index *m, const char *idx_name);
int prepare_multi_pack_index_one(struct repository *r, const char *object_dir, int local);
int write_midx_file(const char *object_dir);
-void clear_midx_file(const char *object_dir);
+void clear_midx_file(struct repository *r);
+
+void close_midx(struct multi_pack_index *m);
#endif