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
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-07-18 17:28:52 +0300
committerJunio C Hamano <gitster@pobox.com>2023-07-18 17:28:53 +0300
commit6016ee0a7130d3ad656def12d724d1525d39af9b (patch)
treebd79cfd02f73ec3044a285b7a3ea633607c4ef70 /t
parentd6e67222c103783616912c26c9906b8167c39ab8 (diff)
parent9281cd07f014263b5385f13b47ff8399282c7cdc (diff)
Merge branch 'tb/fsck-no-progress'
"git fsck --no-progress" still spewed noise from the commit-graph subsystem, which has been corrected. * tb/fsck-no-progress: commit-graph.c: avoid duplicated progress output during `verify` commit-graph.c: pass progress to `verify_one_commit_graph()` commit-graph.c: iteratively verify commit-graph chains commit-graph.c: extract `verify_one_commit_graph()` fsck: suppress MIDX output with `--no-progress` fsck: suppress commit-graph output with `--no-progress`
Diffstat (limited to 't')
-rwxr-xr-xt/t5318-commit-graph.sh10
-rwxr-xr-xt/t5319-multi-pack-index.sh12
-rwxr-xr-xt/t5324-split-commit-graph.sh3
3 files changed, 24 insertions, 1 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh
index b6e1211578..bf8a92317b 100755
--- a/t/t5318-commit-graph.sh
+++ b/t/t5318-commit-graph.sh
@@ -684,6 +684,16 @@ test_expect_success 'git fsck (checks commit-graph when config unset)' '
test_must_fail git fsck
'
+test_expect_success 'git fsck shows commit-graph output with --progress' '
+ git -C "$TRASH_DIRECTORY/full" fsck --progress 2>err &&
+ grep "Verifying commits in commit graph" err
+'
+
+test_expect_success 'git fsck suppresses commit-graph output with --no-progress' '
+ git -C "$TRASH_DIRECTORY/full" fsck --no-progress 2>err &&
+ ! grep "Verifying commits in commit graph" err
+'
+
test_expect_success 'setup non-the_repository tests' '
rm -rf repo &&
git init repo &&
diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh
index 0883c7c6bd..1bcc02004d 100755
--- a/t/t5319-multi-pack-index.sh
+++ b/t/t5319-multi-pack-index.sh
@@ -485,6 +485,18 @@ test_expect_success 'git-fsck incorrect offset' '
git -c core.multiPackIndex=false fsck
'
+test_expect_success 'git fsck shows MIDX output with --progress' '
+ git fsck --progress 2>err &&
+ grep "Verifying OID order in multi-pack-index" err &&
+ grep "Verifying object offsets" err
+'
+
+test_expect_success 'git fsck suppresses MIDX output with --no-progress' '
+ git fsck --no-progress 2>err &&
+ ! grep "Verifying OID order in multi-pack-index" err &&
+ ! grep "Verifying object offsets" err
+'
+
test_expect_success 'corrupt MIDX is not reused' '
corrupt_midx_and_verify $MIDX_BYTE_OFFSET "\377" $objdir \
"incorrect object offset" &&
diff --git a/t/t5324-split-commit-graph.sh b/t/t5324-split-commit-graph.sh
index 669ddc645f..36c4141e67 100755
--- a/t/t5324-split-commit-graph.sh
+++ b/t/t5324-split-commit-graph.sh
@@ -351,7 +351,8 @@ test_expect_success 'add octopus merge' '
git branch merge/octopus &&
git commit-graph write --reachable --split &&
git commit-graph verify --progress 2>err &&
- test_line_count = 3 err &&
+ test_line_count = 1 err &&
+ grep "Verifying commits in commit graph: 100% (18/18)" err &&
test_i18ngrep ! warning err &&
test_line_count = 3 $graphdir/commit-graph-chain
'