Re: [PATCH 5/5] sha1_file: don't re-scan pack directory for null sha1
- From
Jeff King <peff@peff.net>
- Date
- Nov 22, 2017, 03:17 UTC
- Message-ID
- <20171122031701.GA16789@sigill>
- In-Reply-To
- <xmqqr2srxeu2.fsf@gitster.mtv.corp.google.com>
On Wed, Nov 22, 2017 at 10:49:25AM +0900, Junio C Hamano wrote:
Show 8 quoted lines
> WRT existing codepaths that pass 0{40} and refuses to notice a
> potential repository corruption (from getting a NULL for a non null
> object name), I think we would need a sweep of the codebase and fix
> them in the longer term. As long as that will happen someday, either
> approach between "we know 'no loose object? let's redo the packs' is
> the part that matters performance-wise, so let's do a short-cut only
> for that" and "we know that callers that comes with 0{40} want to get
> NULL back" should be OK, I would think.I agree. Let's go with the "v2 5/5" I posted then.
I'll try to work up a patch for the fetch.c case I found tomorrow, but I suspect there are many more. But that's largely orthogonal to the series.
-Peff