summaryrefslogtreecommitdiff
path: root/t/t5319-multi-pack-index.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-08-24 21:54:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-08-24 21:54:28 (GMT)
commit9e8c7542cb1307b0a23c8bdc2a8e039ab6f11b17 (patch)
treea7a252a7c173d8eca3d455c1c329687bf5b295d3 /t/t5319-multi-pack-index.sh
parenta654836d96aced223bfbee57bd2ac1989eb6d77f (diff)
parent1eb22c7dd803fc05513fde0bd96befeb8c725e05 (diff)
downloadgit-9e8c7542cb1307b0a23c8bdc2a8e039ab6f11b17.zip
git-9e8c7542cb1307b0a23c8bdc2a8e039ab6f11b17.tar.gz
git-9e8c7542cb1307b0a23c8bdc2a8e039ab6f11b17.tar.bz2
Merge branch 'ds/midx-repack-to-batch-size'
The "--batch-size" option of "git multi-pack-index repack" command is now used to specify that very small packfiles are collected into one until the total size roughly exceeds it. * ds/midx-repack-to-batch-size: multi-pack-index: repack batches below --batch-size
Diffstat (limited to 't/t5319-multi-pack-index.sh')
-rwxr-xr-xt/t5319-multi-pack-index.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh
index 09cbca4..43b1b5b 100755
--- a/t/t5319-multi-pack-index.sh
+++ b/t/t5319-multi-pack-index.sh
@@ -677,6 +677,7 @@ test_expect_success 'expire respects .keep files' '
'
test_expect_success 'repack --batch-size=0 repacks everything' '
+ cp -r dup dup2 &&
(
cd dup &&
rm .git/objects/pack/*.keep &&
@@ -696,4 +697,21 @@ test_expect_success 'repack --batch-size=0 repacks everything' '
)
'
+test_expect_success 'repack --batch-size=<large> repacks everything' '
+ (
+ cd dup2 &&
+ rm .git/objects/pack/*.keep &&
+ ls .git/objects/pack/*idx >idx-list &&
+ test_line_count = 2 idx-list &&
+ git multi-pack-index repack --batch-size=2000000 &&
+ ls .git/objects/pack/*idx >idx-list &&
+ test_line_count = 3 idx-list &&
+ test-tool read-midx .git/objects | grep idx >midx-list &&
+ test_line_count = 3 midx-list &&
+ git multi-pack-index expire &&
+ ls -al .git/objects/pack/*idx >idx-list &&
+ test_line_count = 1 idx-list
+ )
+'
+
test_done