Re: [PATCH v7] read-cache: force_verify_index_checksum
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 9, 2017, 05:27 UTC
- Message-ID
- <xmqqtw4u38h2.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAP8UFD2v8R8bSjUi8+1271fJ=jR5JbbGfgO_fdeYpzE=EGx_Pw@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 28 quoted lines
> On Fri, Apr 14, 2017 at 10:32 PM, <git@jeffhostetler.com> wrote: >> diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh >> index 33a51c9..677e15a 100755 >> --- a/t/t1450-fsck.sh >> +++ b/t/t1450-fsck.sh >> @@ -689,4 +689,17 @@ test_expect_success 'bogus head does not fallback to all heads' ' >> ! grep $blob out >> ' >> >> +test_expect_success 'detect corrupt index file in fsck' ' >> + cp .git/index .git/index.backup && >> + test_when_finished "mv .git/index.backup .git/index" && >> + echo zzzzzzzz >zzzzzzzz && >> + git add zzzzzzzz && >> + sed -e "s/zzzzzzzz/yyyyyyyy/" .git/index >.git/index.yyy && >> + mv .git/index.yyy .git/index && >> + # Confirm that fsck detects invalid checksum >> + test_must_fail git fsck --cache && >> + # Confirm that status no longer complains about invalid checksum >> + git status >> +' > > This test does not pass when the GIT_TEST_SPLIT_INDEX env variable is > set on my Linux machine. > > Also it looks like you sent a v8 of this patch series with a different > test, but what is in master looks like the above test instead of the > test in your v8.
Thanks for raising this. I almost forgot that the final finishing touch to update the test was needed in 'master', and this exchange caught it before it is too late.