Re: [PATCH] commit: detect commits that exist in commit-graph but not in the ODB
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 19, 2023, 17:16 UTC
- Message-ID
- <xmqqzg0ey1kn.fsf@gitster.g>
- In-Reply-To
- <ZTDn-Wd5xsFrBmqI@tanuki>
Patrick Steinhardt <ps@pks.im> writes:
Show 5 quoted lines
> 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.