summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-08-01 16:10:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-01 16:10:50 (GMT)
commit51cf315870bbb7254ddf06c84fe03b41bc48eebd (patch)
tree65b7cc81597ac7cb168cc7e39d1aad43758b4c8e /t
parent49541dbb36b4a6f68dfe341850aa20dcebbe7641 (diff)
parent7ff024e7b3d576fc265dbdd1a7bd3dcc6dde1eb6 (diff)
downloadgit-51cf315870bbb7254ddf06c84fe03b41bc48eebd.zip
git-51cf315870bbb7254ddf06c84fe03b41bc48eebd.tar.gz
git-51cf315870bbb7254ddf06c84fe03b41bc48eebd.tar.bz2
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')
-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 0e9af83..4e855bc 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