Re: [PATCH] commit-graph: disable GIT_COMMIT_GRAPH_PARANOIA by default
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 14, 2023, 16:51 UTC
- Message-ID
- <xmqqzfzgxops.fsf@gitster.g>
- In-Reply-To
- <xmqq7cmkz3fi.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 22 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > >> Gah, I forgot to run this with GIT_TEST_COMMIT_GRAPH=1 before sending >> this patch. There are two test failures that this change introduces: >> >> - t6022-rev-list-missing.sh, where we test for the `--missing=` option >> of git-rev-list(1). > > I would have expected you to enable the paranoia mode automatically > when this option is in effect. > >> Both of these are expected failures: we knowingly corrupt the repository >> and circumvent git-gc(1)/git-maintenance(1), thus no commit-graphs are >> updated. If we stick with the new stance that repository corruption >> should not require us to pessimize the common case,... > > Yeah, just like we try to be extra careful while running fsck, > because "--missing" is about finding these "corrupt" cases, > triggering the paranoia mode upon seeing the option would make > sense, no? It would fix the failure in 6022, right? > > Thanks for working on this.
Just to make sure we do not miscommunicate, I do not think we want to trigger the paranoia mode only in our tests. We want to be paranoid to help real users who used "--missing" for their real use, so enabling PARANOIA in the test script is a wrong approach. We should enable it inside "rev-list --missing" codepath.