summaryrefslogtreecommitdiff
path: root/t/t7700-repack.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-08-01 09:10:50 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-08-01 09:10:50 -0700
commit51cf315870bbb7254ddf06c84fe03b41bc48eebd (patch)
tree65b7cc81597ac7cb168cc7e39d1aad43758b4c8e /t/t7700-repack.sh
parentMerge branch 'jk/sort-iter-test-output' (diff)
parentrepack: simplify handling of auto-bitmaps and .keep files (diff)
downloadtgif-51cf315870bbb7254ddf06c84fe03b41bc48eebd.tar.xz
Merge branch 'jk/repack-silence-auto-bitmap-warning'
Squelch unneeded and misleading warnings from "repack" when the command attempts to generate pack bitmaps without explicitly asked for by the user. * jk/repack-silence-auto-bitmap-warning: repack: simplify handling of auto-bitmaps and .keep files repack: silence warnings when auto-enabled bitmaps cannot be built t7700: clean up .keep file in bitmap-writing test
Diffstat (limited to 't/t7700-repack.sh')
-rwxr-xr-xt/t7700-repack.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index 0e9af832c9..4e855bc21b 100755
--- a/t/t7700-repack.sh
+++ b/t/t7700-repack.sh
@@ -243,10 +243,23 @@ test_expect_success 'no bitmaps created if .keep files present' '
pack=$(ls bare.git/objects/pack/*.pack) &&
test_path_is_file "$pack" &&
keep=${pack%.pack}.keep &&
+ test_when_finished "rm -f \"\$keep\"" &&
>"$keep" &&
- git -C bare.git repack -ad &&
+ git -C bare.git repack -ad 2>stderr &&
+ test_must_be_empty stderr &&
find bare.git/objects/pack/ -type f -name "*.bitmap" >actual &&
test_must_be_empty actual
'
+test_expect_success 'auto-bitmaps do not complain if unavailable' '
+ test_config -C bare.git pack.packSizeLimit 1M &&
+ blob=$(test-tool genrandom big $((1024*1024)) |
+ git -C bare.git hash-object -w --stdin) &&
+ git -C bare.git update-ref refs/tags/big $blob &&
+ git -C bare.git repack -ad 2>stderr &&
+ test_must_be_empty stderr &&
+ find bare.git/objects/pack -type f -name "*.bitmap" >actual &&
+ test_must_be_empty actual
+'
+
test_done