'
test_expect_success EXPENSIVE 'incremental-repack 2g limit' '
- test_config core.compression 0 &&
+ test_when_finished rm -rf expensive-repo &&
+ git init expensive-repo &&
+ (
+ cd expensive-repo &&
+ git config set core.compression 0 &&
+ git config set maintenance.auto false &&
- for i in $(test_seq 1 5)
- do
- test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
- return 1
- done &&
- git add big &&
- git commit -qm "Add big file (1)" &&
+ for i in $(test_seq 1 5)
+ do
+ test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
+ return 1
+ done &&
+ git add big &&
+ git commit -qm "Add big file (1)" &&
- # ensure any possible loose objects are in a pack-file
- git maintenance run --task=loose-objects &&
+ # ensure any possible loose objects are in a pack-file
+ git maintenance run --task=loose-objects &&
- rm big &&
- for i in $(test_seq 6 10)
- do
- test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
- return 1
- done &&
- git add big &&
- git commit -qm "Add big file (2)" &&
+ rm big &&
+ for i in $(test_seq 6 10)
+ do
+ test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
+ return 1
+ done &&
+ git add big &&
+ git commit -qm "Add big file (2)" &&
- # ensure any possible loose objects are in a pack-file
- git maintenance run --task=loose-objects &&
+ # ensure any possible loose objects are in a pack-file
+ git maintenance run --task=loose-objects &&
- # Now run the incremental-repack task and check the batch-size
- GIT_TRACE2_EVENT="$(pwd)/run-2g.txt" git maintenance run \
- --task=incremental-repack 2>/dev/null &&
- test_subcommand git multi-pack-index repack \
- --no-progress --batch-size=2147483647 <run-2g.txt
+ # Now run the incremental-repack task and check the batch-size
+ GIT_TRACE2_EVENT="$(pwd)/run-2g.txt" git maintenance run \
+ --task=incremental-repack 2>/dev/null &&
+ test_subcommand git multi-pack-index repack \
+ --no-progress --batch-size=2147483647 <run-2g.txt
+ )
'
run_incremental_repack_and_verify () {