3 test_description
='pack-object compression configuration'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success setup
'
10 git hash-object -w --stdin >object-name &&
11 # make sure it resulted in a loose object
12 ob=$(sed -e "s/\(..\).*/\1/" object-name) &&
13 ject=$(sed -e "s/..\(.*\)/\1/" object-name) &&
14 test -f .git/objects/$ob/$ject
17 while read expect config
19 test_expect_success
"pack-objects with $config" '
20 test_when_finished "rm -f pack-*.*" &&
21 git $config pack-objects pack <object-name &&
22 sz=$(test_file_size pack-*.pack) &&
24 small) test "$sz" -le 100000 ;;
25 large) test "$sz" -ge 100000 ;;
29 large
-c core.compression
=0
30 small
-c core.compression
=9
31 large
-c core.compression
=0 -c pack.compression
=0
32 large
-c core.compression
=9 -c pack.compression
=0
33 small
-c core.compression
=0 -c pack.compression
=9
34 small
-c core.compression
=9 -c pack.compression
=9
35 large
-c pack.compression
=0
36 small
-c pack.compression
=9