Re: [PATCH 5/5] sha1_file: don't re-scan pack directory for null sha1
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 25, 2017, 03:20 UTC
- Message-ID
- <xmqqh8tjkpsl.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20171124173201.GA29190@sigill>
Jeff King <peff@peff.net> writes:
> So I dunno. That is far from exhaustive, but it does seem like most > cases should assume the presence of the file.
You are right. I should have considered that "we got a random object-name looking thing and we do not care if it does not exist" is a very narrow minority case. Most of the object names we deal with come from local repository traversal and unless things like the "fsck-promisor" comes into the picture, we should always have them available locally.
Show 5 quoted lines
> But it may not be that big a deal. For the most part, all bets are off > in a corrupt repo. My main concern is just that we do not want the > corruption to spread or to make it harder for us to recover from (and > that includes allowing us to delete or overwrite other data that would > otherwise be forbidden, which is what's happening in the fetch case).
Absolutely.
Thanks.