|
354 | 354 |
|
355 | 355 | # Create 14 additional references, which brings us to |
356 | 356 | # 15 together with the default branch. |
357 | | - printf "create refs/heads/loose-%d HEAD\n" $(test_seq 14) >stdin && |
358 | | - git update-ref --stdin <stdin && |
| 357 | + test_seq -f "create refs/heads/loose-%d HEAD" 14 | |
| 358 | + git update-ref --stdin && |
359 | 359 | test_path_is_missing .git/packed-refs && |
360 | 360 | git ${pack_refs} --auto --all && |
361 | 361 | test_path_is_missing .git/packed-refs && |
|
379 | 379 | test_line_count = 2 .git/packed-refs && |
380 | 380 |
|
381 | 381 | # Create 15 loose references. |
382 | | - printf "create refs/heads/loose-%d HEAD\n" $(test_seq 15) >stdin && |
383 | | - git update-ref --stdin <stdin && |
| 382 | + test_seq -f "create refs/heads/loose-%d HEAD" 15 | |
| 383 | + git update-ref --stdin && |
384 | 384 | git ${pack_refs} --auto --all && |
385 | 385 | test_line_count = 2 .git/packed-refs && |
386 | 386 |
|
|
401 | 401 |
|
402 | 402 | # Create 99 packed refs. This should cause the heuristic |
403 | 403 | # to require more than the minimum amount of loose refs. |
404 | | - test_seq 99 | |
405 | | - while read i |
406 | | - do |
407 | | - printf "create refs/heads/packed-%d HEAD\n" $i || return 1 |
408 | | - done >stdin && |
409 | | - git update-ref --stdin <stdin && |
| 404 | + test_seq -f "create refs/heads/packed-%d HEAD" 99 | |
| 405 | + git update-ref --stdin && |
410 | 406 | git ${pack_refs} --all && |
411 | 407 | test_line_count = 101 .git/packed-refs && |
412 | 408 |
|
413 | 409 | # Create 24 loose refs, which should not yet cause us to repack. |
414 | | - printf "create refs/heads/loose-%d HEAD\n" $(test_seq 24) >stdin && |
415 | | - git update-ref --stdin <stdin && |
| 410 | + test_seq -f "create refs/heads/loose-%d HEAD" 24 | |
| 411 | + git update-ref --stdin && |
416 | 412 | git ${pack_refs} --auto --all && |
417 | 413 | test_line_count = 101 .git/packed-refs && |
418 | 414 |
|
419 | 415 | # Create another handful of refs to cross the border. |
420 | 416 | # Note that we explicitly do not check for strict |
421 | 417 | # boundaries here, as this also depends on the size of |
422 | 418 | # the object hash. |
423 | | - printf "create refs/heads/addn-%d HEAD\n" $(test_seq 10) >stdin && |
424 | | - git update-ref --stdin <stdin && |
| 419 | + test_seq -f "create refs/heads/addn-%d HEAD" 10 | |
| 420 | + git update-ref --stdin && |
425 | 421 | git ${pack_refs} --auto --all && |
426 | 422 | test_line_count = 135 .git/packed-refs |
427 | 423 | ) |
|
0 commit comments