git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] some "commit-graph verify" fixes for chains
@ 2023-09-26  5:54 Jeff King
  2023-09-26  5:56 ` [PATCH 1/6] commit-graph: factor out chain opening function Jeff King
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Jeff King @ 2023-09-26  5:54 UTC (permalink / raw)
  To: git; +Cc: Taylor Blau, Derrick Stolee

While yak-shaving another topic, I noticed that there are a bunch of
error cases that "git commit-graph verify" does not notice when checking
chained graph files. This series should make it more robust.

Some of these cases are actually covered in t5324 already, but the tests
expect the verify command not to fail, which just seems wrong. I don't
see anything in the commit message or mailing list explaining it, so I
think it was just "well, this is how it behaves now", and not some
clever scheme.

  [1/6]: commit-graph: factor out chain opening function
  [2/6]: commit-graph: check mixed generation validation when loading chain file
  [3/6]: t5324: harmonize sha1/sha256 graph chain corruption
  [4/6]: commit-graph: detect read errors when verifying graph chain
  [5/6]: commit-graph: tighten chain size check
  [6/6]: commit-graph: report incomplete chains during verification

 builtin/commit-graph.c        |  31 +++++++---
 commit-graph.c                | 109 ++++++++++++++++++++++------------
 commit-graph.h                |   4 ++
 t/t5324-split-commit-graph.sh |  48 +++++++++++++--
 4 files changed, 141 insertions(+), 51 deletions(-)

-Peff

PS If you are curious about the yak-shave, it is:

     3. "commit-graph verify" fails to propagate some errors (this
	series)
     2. we are missing a bunch of bounds checks on commit-graph files;
	fixing that makes the tests inconsistent because of (3)
     1. there are some unused parameters that should be used for bounds
	checks, hence (2)

  Just in case anybody thought there was a part of my life that was not
  motivated by removing -Wunused-parameter warnings.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-10-05 17:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-26  5:54 [PATCH 0/6] some "commit-graph verify" fixes for chains Jeff King
2023-09-26  5:56 ` [PATCH 1/6] commit-graph: factor out chain opening function Jeff King
2023-09-26  5:57 ` [PATCH 2/6] commit-graph: check mixed generation validation when loading chain file Jeff King
2023-09-26  5:58 ` [PATCH 3/6] t5324: harmonize sha1/sha256 graph chain corruption Jeff King
2023-09-26  6:00 ` [PATCH 4/6] commit-graph: detect read errors when verifying graph chain Jeff King
2023-09-26  6:03 ` [PATCH 5/6] commit-graph: tighten chain size check Jeff King
2023-09-26  6:04 ` [PATCH 6/6] commit-graph: report incomplete chains during verification Jeff King
2023-09-28  4:30   ` Jeff King
2023-09-28  4:37 ` [PATCH v2 0/6] some "commit-graph verify" fixes for chains Jeff King
2023-09-28  4:38   ` [PATCH v2 1/6] commit-graph: factor out chain opening function Jeff King
2023-09-28  4:38   ` [PATCH v2 2/6] commit-graph: check mixed generation validation when loading chain file Jeff King
2023-09-28  4:38   ` [PATCH v2 3/6] t5324: harmonize sha1/sha256 graph chain corruption Jeff King
2023-09-28  4:38   ` [PATCH v2 4/6] commit-graph: detect read errors when verifying graph chain Jeff King
2023-09-28  4:39   ` [PATCH v2 5/6] commit-graph: tighten chain size check Jeff King
2023-09-28  4:39   ` [PATCH v2 6/6] commit-graph: report incomplete chains during verification Jeff King
2023-10-05 17:38   ` [PATCH v2 0/6] some "commit-graph verify" fixes for chains Taylor Blau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).