On Thu, Sep 08, 2022 at 10:39:08AM +0000, 程洋 wrote: > > 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@xxxxxxxxxxxxx/ 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