[PATCH 0/2] bug with rev-list --verify-objects and commit-graph
- From
Jeff King <peff@peff.net>
- Date
- Sep 6, 2022, 20:58 UTC
- Message-ID
- <Yxe0k++LA/UfFLF/@coredump.intra.peff.net>
While looking at something unrelated, I noticed that "git rev-list --verify-objects" will not actually notice corruptions of commits that are found in a commit graph. This fixes it.
The first one is a cleanup that is not strictly related, but is needed for the tests in the second to work reliably (and is a good idea anyway).
The second is the fix. I don't think it's super-important, as we do not use --verify-objects for anything, since d21c463d55 (fetch/receive: remove over-pessimistic connectivity check, 2012-03-15). And it's not even documented, so perhaps we should just consider getting rid of it. But in the meantime, it was easy enough to correct.
[1/2]: lookup_commit_in_graph(): use prepare_commit_graph() to check for graph [2/2]: rev-list: disable commit graph with --verify-objects
commit-graph.c | 2 +- revision.c | 1 + t/t1450-fsck.sh | 28 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-)
-Peff