Re: [External Mail]Re: [PATCH 3/3] parse_object(): check commit-graph when skip_hash set
- From
Jeff King <peff@peff.net>
- Date
- Sep 8, 2022, 18:42 UTC
- Message-ID
- <Yxo3hXg7AwrqzQO8@coredump.intra.peff.net>
- In-Reply-To
- <a87e9eaccf7849fc9eeb10ce7d373db0@xiaomi.com>
On Thu, Sep 08, 2022 at 10:39:08AM +0000, 程洋 wrote:
Show 12 quoted lines
> > If the caller told us that they don't care about us checking the > > object hash, then we're free to implement any optimizations that get > > us the parsed value more quickly. An obvious one is to check the > > commit graph before loading an object from disk. And in fact, both of > > the callers who pass in this flag are already doing so before they call > > parse_object()! > > > So we can simplify those callers, as well as any possible future ones, > > by moving the logic into parse_object(). > > I need to mention that there is serious issue with commit-graph together with partial-clone > https://lore.kernel.org/git/20220709005227.82423-1-hanxin.hx@bytedance.com/
Yes, though I don't think that changes anything with respect to my patches. The argument here is simply that if a caller is OK skipping the hash check, they are OK with using the commit graph, and vice versa. Until the bug in the linked thread is fixed, it is a good idea to disable the commit graph. But it does not change the intent of the calling code.
-Peff