summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Glen Choo <chooglen@google.com>2021-10-15 13:16:30 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-10-15 14:30:08 -0700
commitdc5570872f684f7c838fe7571225d279243b8700 (patch)
treea80685466218c7f07d2d4f9f0607cbb6b0ee099e /builtin
parentfsck: verify commit graph when implicitly enabled (diff)
downloadtgif-dc5570872f684f7c838fe7571225d279243b8700.tar.xz
fsck: verify multi-pack-index when implictly enabled
Like the previous commit, change fsck to check the "core_multi_pack_index" variable set in "repo-settings.c" instead of reading the "core.multiPackIndex" config variable. This fixes a bug where we wouldn't verify midx if the config key was missing. This bug was introduced in 18e449f86b (midx: enable core.multiPackIndex by default, 2020-09-25) where core.multiPackIndex was turned on by default. Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/fsck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/fsck.c b/builtin/fsck.c
index 1c4e485b66..5bbe8068ec 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -925,7 +925,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
}
}
- if (!git_config_get_bool("core.multipackindex", &i) && i) {
+ if (the_repository->settings.core_multi_pack_index) {
struct child_process midx_verify = CHILD_PROCESS_INIT;
const char *midx_argv[] = { "multi-pack-index", "verify", NULL, NULL, NULL };