diff options
author | Glen Choo <chooglen@google.com> | 2021-10-15 13:16:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-15 14:30:08 -0700 |
commit | dc5570872f684f7c838fe7571225d279243b8700 (patch) | |
tree | a80685466218c7f07d2d4f9f0607cbb6b0ee099e /t/t5319-multi-pack-index.sh | |
parent | fsck: verify commit graph when implicitly enabled (diff) | |
download | tgif-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 't/t5319-multi-pack-index.sh')
-rwxr-xr-x | t/t5319-multi-pack-index.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh index bd17f308b3..38999f115f 100755 --- a/t/t5319-multi-pack-index.sh +++ b/t/t5319-multi-pack-index.sh @@ -452,7 +452,10 @@ test_expect_success 'verify incorrect offset' ' test_expect_success 'git-fsck incorrect offset' ' corrupt_midx_and_verify $MIDX_BYTE_OFFSET "\377" $objdir \ "incorrect object offset" \ - "git -c core.multipackindex=true fsck" + "git -c core.multiPackIndex=true fsck" && + test_unconfig core.multiPackIndex && + test_must_fail git fsck && + git -c core.multiPackIndex=false fsck ' test_expect_success 'corrupt MIDX is not reused' ' |