diff options
author | Taylor Blau <me@ttaylorr.com> | 2023-08-21 23:34:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-08-22 01:16:23 +0200 |
commit | db6044d76261a996c03ce8f1e08240f326a42e15 (patch) | |
tree | f1856b8ba2fb03970529f8defd4762d87646541f /t/t5318-commit-graph.sh | |
parent | t/t5318-commit-graph.sh: test generation zero transitions during fsck (diff) | |
download | git-db6044d76261a996c03ce8f1e08240f326a42e15.tar.xz git-db6044d76261a996c03ce8f1e08240f326a42e15.zip |
commit-graph: avoid repeated mixed generation number warnings
When validating that a commit-graph has either all zero, or all non-zero
generation numbers, we emit a warning on both the rising and falling
edge of transitioning between the two.
So if we are unfortunate enough to see a commit-graph which has a
repeating sequence of zero, then non-zero generation numbers, we'll
generate many warnings that contain more or less the same information.
Avoid this by keeping track of a single example for a commit with zero-
and non-zero generation, and emit a single warning at the end of
verification if both are non-NULL.
Co-authored-by: Jeff King <peff@peff.net>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rwxr-xr-x | t/t5318-commit-graph.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index 8e96471b34..ba65f17dd9 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -620,12 +620,12 @@ test_expect_success 'detect incorrect chunk count' ' test_expect_success 'detect mixed generation numbers (non-zero to zero)' ' corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_GENERATION_LAST "\0\0\0\0" \ - "but non-zero elsewhere" + "both zero and non-zero generations" ' test_expect_success 'detect mixed generation numbers (zero to non-zero)' ' corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_GENERATION "\0\0\0\0" \ - "but zero elsewhere" + "both zero and non-zero generations" ' test_expect_success 'git fsck (checks commit-graph when config set to true)' ' |