aboutsummaryrefslogtreecommitdiffstats
path: root/t/t5318-commit-graph.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-11-09 02:25:07 -0500
committerJunio C Hamano <gitster@pobox.com>2023-11-09 19:07:53 +0900
commit06fb135f8eddc64071a719fe309c771883c07775 (patch)
treee6dd1ffd2fe9fa5f8f2b3a6b99aa6e90d60d3739 /t/t5318-commit-graph.sh
parentcommit-graph: use fanout value for graph size (diff)
downloadgit-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-xt/t5318-commit-graph.sh1
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
'