Jonathan Tan <jonathantanmy@xxxxxxxxxx> writes: > When parsing commits, fail fast when the commit is missing or > corrupt, instead of attempting to fetch them. This is done by > inlining repo_read_object_file() and setting the flag that > prevents fetching. > > This is motivated by a situation in which through a bug (not > necessarily through Git), there was corruption in the object store > of a partial clone. In this particular case, the problem was > exposed when "git gc" tried to expire reflogs, which calls > repo_parse_commit(), which triggers fetches of the missing > commits. The assumption is that there will never be a filtering mode that says "give us tags and we will lazy-fetch everything reachable from it when we need it", with which the "solution" will break down, I think, and I would say it is probably good enough.