Patrick Steinhardt <ps@xxxxxx> writes: > There's another way to handle this, which is to conditionally enable the > object existence check. This would be less of a performance hit compared > to disabling commit graphs altogether with `--missing`, but still ensure > that repository corruption was detected. Second, it would not regress > performance for all preexisting users of `repo_parse_commit_gently()`. The above was what I meant to suggest when you demonstrated that the code with additional check is still much more performant than running without the commit-graph optimization, yet has observable impact on performance for normal codepaths that do not need the extra carefulness. But I wasn't sure if it is easy to plumb the "do we want to double check? in other words, are we running something like --missing that care the correctness a bit more than usual cases?" bit down from the caller, because this check is so deep in the callchain. Thanks.