461
'
462
463
test_expect_success EXPENSIVE 'incremental-repack 2g limit' '
464
- test_config core.compression 0 &&
464
+ test_when_finished rm -rf expensive-repo &&
465
+ git init expensive-repo &&
466
+ (
467
+ cd expensive-repo &&
468
+ git config set core.compression 0 &&
469
+ git config set maintenance.auto false &&
470
466
- for i in $(test_seq 1 5)
467
- do
468
- test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
469
- return 1
470
- done &&
471
- git add big &&
472
- git commit -qm "Add big file (1)" &&
471
+ for i in $(test_seq 1 5)
472
+ do
473
+ test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
474
+ return 1
475
+ done &&
476
+ git add big &&
477
+ git commit -qm "Add big file (1)" &&
478
474
- # ensure any possible loose objects are in a pack-file
475
- git maintenance run --task=loose-objects &&
479
+ # ensure any possible loose objects are in a pack-file
480
+ git maintenance run --task=loose-objects &&
481
477
- rm big &&
478
- for i in $(test_seq 6 10)
479
- do
480
- test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
481
- return 1
482
- done &&
483
- git add big &&
484
- git commit -qm "Add big file (2)" &&
482
+ rm big &&
483
+ for i in $(test_seq 6 10)
484
+ do
485
+ test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
486
+ return 1
487
+ done &&
488
+ git add big &&
489
+ git commit -qm "Add big file (2)" &&
490
486
- # ensure any possible loose objects are in a pack-file
487
- git maintenance run --task=loose-objects &&
491
+ # ensure any possible loose objects are in a pack-file
492
+ git maintenance run --task=loose-objects &&
493
489
- # Now run the incremental-repack task and check the batch-size
490
- GIT_TRACE2_EVENT="$(pwd)/run-2g.txt" git maintenance run \
491
- --task=incremental-repack 2>/dev/null &&
492
- test_subcommand git multi-pack-index repack \
493
- --no-progress --batch-size=2147483647 <run-2g.txt
494
+ # Now run the incremental-repack task and check the batch-size
495
+ GIT_TRACE2_EVENT="$(pwd)/run-2g.txt" git maintenance run \
496
+ --task=incremental-repack 2>/dev/null &&
497
+ test_subcommand git multi-pack-index repack \
498
+ --no-progress --batch-size=2147483647 <run-2g.txt
499
+ )
500
'
501
502
run_incremental_repack_and_verify () {