summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-16 07:15:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-16 07:15:58 (GMT)
commit36d767d02e12c1ff991511b7bd8c1d023340f2ca (patch)
tree028b22c2a0761e229d9c02e29870d2009e274bfa /t
parent5a0cc8aca797dbd7d2be3b67458ff880ed45cddf (diff)
parent6b89a34c89fc763292f06012318b852b74825619 (diff)
downloadgit-36d767d02e12c1ff991511b7bd8c1d023340f2ca.zip
git-36d767d02e12c1ff991511b7bd8c1d023340f2ca.tar.gz
git-36d767d02e12c1ff991511b7bd8c1d023340f2ca.tar.bz2
Merge branch 'ab/commit-graph-progress'
Generation of (experimental) commit-graph files have so far been fairly silent, even though it takes noticeable amount of time in a meaningfully large repository. The users will now see progress output. * ab/commit-graph-progress: gc: fix regression in 7b0f229222 impacting --quiet commit-graph verify: add progress output commit-graph write: add progress output
Diffstat (limited to 't')
-rwxr-xr-xt/t6500-gc.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t6500-gc.sh b/t/t6500-gc.sh
index 818435f..b3fbd87 100755
--- a/t/t6500-gc.sh
+++ b/t/t6500-gc.sh
@@ -4,6 +4,7 @@ test_description='basic git gc tests
'
. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-terminal.sh
test_expect_success 'setup' '
# do not let the amount of physical memory affects gc
@@ -99,6 +100,26 @@ test_expect_success 'auto gc with too many loose objects does not attempt to cre
test_line_count = 2 new # There is one new pack and its .idx
'
+test_expect_success 'gc --no-quiet' '
+ git -c gc.writeCommitGraph=true gc --no-quiet >stdout 2>stderr &&
+ test_must_be_empty stdout &&
+ test_line_count = 1 stderr &&
+ test_i18ngrep "Computing commit graph generation numbers" stderr
+'
+
+test_expect_success TTY 'with TTY: gc --no-quiet' '
+ test_terminal git -c gc.writeCommitGraph=true gc --no-quiet >stdout 2>stderr &&
+ test_must_be_empty stdout &&
+ test_i18ngrep "Enumerating objects" stderr &&
+ test_i18ngrep "Computing commit graph generation numbers" stderr
+'
+
+test_expect_success 'gc --quiet' '
+ git -c gc.writeCommitGraph=true gc --quiet >stdout 2>stderr &&
+ test_must_be_empty stdout &&
+ test_must_be_empty stderr
+'
+
run_and_wait_for_auto_gc () {
# We read stdout from gc for the side effect of waiting until the
# background gc process exits, closing its fd 9. Furthermore, the