Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2023-08-22 00:34:42 +0300
committerJunio C Hamano <gitster@pobox.com>2023-08-22 02:16:23 +0300
commitdb6044d76261a996c03ce8f1e08240f326a42e15 (patch)
treef1856b8ba2fb03970529f8defd4762d87646541f /t/t5318-commit-graph.sh
parentce7629a315459c12451ee9071db22f8b0e26a4eb (diff)
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 't/t5318-commit-graph.sh')
-rwxr-xr-xt/t5318-commit-graph.sh4
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)' '