3 test_description
='compression setting of fast-import utility'
6 # This should be moved to test-lib.sh together with the
7 # copy in t0021 after both topics have graduated to 'master'.
9 test-tool path-utils file-size
"$1"
16 printf "%2000000s
\n" "$
*"
18 ) | git "$@
" fast-import
21 while read expect config
23 test_expect_success "fast-import
(packed
) with
$config" '
24 test_when_finished "rm -f .git
/objects
/pack
/pack-
*.
*" &&
25 test_when_finished "rm -rf .git
/objects
/??
" &&
26 import_large -c fastimport.unpacklimit=0 $config &&
27 sz=$(file_size .git/objects/pack/pack-*.pack) &&
29 small) test "$sz" -le 100000 ;;
30 large) test "$sz" -ge 100000 ;;
34 large -c core.compression=0
35 small -c core.compression=9
36 large -c core.compression=0 -c pack.compression=0
37 large -c core.compression=9 -c pack.compression=0
38 small -c core.compression=0 -c pack.compression=9
39 small -c core.compression=9 -c pack.compression=9
40 large -c pack.compression=0
41 small -c pack.compression=9
44 while read expect config
46 test_expect_success "fast-import
(loose
) with
$config" '
47 test_when_finished "rm -f .git
/objects
/pack
/pack-
*.
*" &&
48 test_when_finished "rm -rf .git
/objects
/??
" &&
49 import_large -c fastimport.unpacklimit=9 $config &&
50 sz=$(file_size .git/objects/??/????*) &&
52 small) test "$sz" -le 100000 ;;
53 large) test "$sz" -ge 100000 ;;
57 large -c core.compression=0
58 small -c core.compression=9
59 large -c core.compression=0 -c core.loosecompression=0
60 large -c core.compression=9 -c core.loosecompression=0
61 small -c core.compression=0 -c core.loosecompression=9
62 small -c core.compression=9 -c core.loosecompression=9
63 large -c core.loosecompression=0
64 small -c core.loosecompression=9