summaryrefslogtreecommitdiff
path: root/t/t7700-repack.sh
diff options
context:
space:
mode:
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