diff options
| author | Jeff King <peff@peff.net> | 2023-11-09 02:25:07 -0500 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-11-09 19:07:53 +0900 |
| commit | 06fb135f8eddc64071a719fe309c771883c07775 (patch) | |
| tree | e6dd1ffd2fe9fa5f8f2b3a6b99aa6e90d60d3739 /t/t5318-commit-graph.sh | |
| parent | commit-graph: use fanout value for graph size (diff) | |
| download | git-06fb135f8eddc64071a719fe309c771883c07775.tar.gz git-06fb135f8eddc64071a719fe309c771883c07775.zip | |
commit-graph: check order while reading fanout chunk
We read the fanout chunk, storing a pointer to it, but only confirm that
the entries are monotonic in a final "lite" verification step. Let's
move that into the actual OIDF chunk callback, so that we can report
problems immediately (for all the reasons given in the previous
"commit-graph: abort as soon as we see a bogus chunk" commit).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5318-commit-graph.sh')
| -rwxr-xr-x | t/t5318-commit-graph.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index 9d186e7b13..b0d436a6f0 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -867,6 +867,7 @@ test_expect_success 'reader notices out-of-bounds fanout' ' check_corrupt_chunk OIDF 0 $(printf "%02x000000" $(test_seq 0 254)) && cat >expect.err <<-\EOF && error: commit-graph fanout values out of order + error: commit-graph required OID fanout chunk missing or corrupted EOF test_cmp expect.err err ' |
