git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff Hostetler <git@jeffhostetler.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: git@vger.kernel.org, gitster@pobox.com, peff@peff.net,
	Jeff Hostetler <jeffhost@microsoft.com>
Subject: Re: [PATCH v7] read-cache: force_verify_index_checksum
Date: Mon, 24 Apr 2017 14:39:27 -0400	[thread overview]
Message-ID: <8bde0b54-c0f6-364d-1f08-ce5207eb6c86@jeffhostetler.com> (raw)
In-Reply-To: <870a8a36-fc6c-6b07-d09e-eec8a9f46a5c@kdbg.org>



On 4/24/2017 1:26 PM, Johannes Sixt wrote:
> Am 14.04.2017 um 22:32 schrieb git@jeffhostetler.com:
>> 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 &&
>
> sed on a binary file? Sooner or later we are going to run into 
> portability issues.

In v5 of this patch series I used "perl" and it was suggested that I use 
"sed" instead.
It doesn't matter to me which we use.  My testing showed that it was 
safe, but that
was only Linux.

Does the mailing list have a preference for this ?

>
>
>> +    mv .git/index.yyy .git/index &&
>> +    # Confirm that fsck detects invalid checksum
>> +    test_must_fail git fsck --cache &&
>
> You should ensure that this failure is really because of an invalid 
> checksum. The failure could also be due to an extra LF at the end that 
> sed inserted, no?

I suppose we could, but I'm tempted to wait on that for now.

Jeff


  reply	other threads:[~2017-04-24 18:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-14 20:32 [PATCH v7] read-cache: call verify_hdr() in a background thread git
2017-04-14 20:32 ` [PATCH v7] read-cache: force_verify_index_checksum git
2017-04-24 17:26   ` Johannes Sixt
2017-04-24 18:39     ` Jeff Hostetler [this message]
2017-04-25  2:10       ` Junio C Hamano
2017-04-25 21:04         ` Johannes Schindelin
2017-04-26  3:25           ` Junio C Hamano
2017-05-08  9:45   ` Christian Couder
2017-05-08 16:50     ` Jeff Hostetler
2017-05-08 20:03       ` Christian Couder
2017-05-08 20:18         ` Jeff Hostetler
2017-05-09  2:11           ` Junio C Hamano
2017-05-09  5:27     ` Junio C Hamano

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=8bde0b54-c0f6-364d-1f08-ce5207eb6c86@jeffhostetler.com \
    --to=git@jeffhostetler.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.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).