summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-08-24 14:54:28 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-08-24 14:54:28 -0700
commit9e8c7542cb1307b0a23c8bdc2a8e039ab6f11b17 (patch)
treea7a252a7c173d8eca3d455c1c329687bf5b295d3 /t
parentMerge branch 'es/init-no-separate-git-dir-in-bare' (diff)
parentmulti-pack-index: repack batches below --batch-size (diff)
downloadtgif-9e8c7542cb1307b0a23c8bdc2a8e039ab6f11b17.tar.xz
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')
-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 09cbca4949..43b1b5b2af 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