test_expect_success \
'setup' \
- 'rm -f .git/index*
+ 'rm -f .git/index* &&
perl -e "print \"a\" x 4096;" > a &&
perl -e "print \"b\" x 4096;" > b &&
perl -e "print \"c\" x 4096;" > c &&
- git update-index --add a b c &&
+ test-genrandom "seed a" 2097152 > a_big &&
+ test-genrandom "seed b" 2097152 > b_big &&
+ git update-index --add a a_big b b_big c &&
cat c >d && echo foo >>d && git update-index --add d &&
tree=`git write-tree` &&
commit=`git commit-tree $tree </dev/null` && {
git cat-file $t $object || return 1
done <obj-list
} >current &&
- diff expect current'
+ test_cmp expect current'
test_expect_success \
'use packed deltified (REF_DELTA) objects' \
git cat-file $t $object || return 1
done <obj-list
} >current &&
- diff expect current'
+ test_cmp expect current'
test_expect_success \
'use packed deltified (OFS_DELTA) objects' \
git cat-file $t $object || return 1
done <obj-list
} >current &&
- diff expect current'
+ test_cmp expect current'
unset GIT_OBJECT_DIRECTORY
'
test_expect_success 'honor pack.packSizeLimit' '
- git config pack.packSizeLimit 200 &&
+ git config pack.packSizeLimit 3m &&
packname_10=$(git pack-objects test-10 <obj-list) &&
- test 3 = $(ls test-10-*.pack | wc -l)
+ test 2 = $(ls test-10-*.pack | wc -l)
'
test_expect_success 'verify resulting packs' '
git verify-pack test-10-*.pack
'
-test_expect_success 'tolerate absurdly small packsizelimit' '
- git config pack.packSizeLimit 2 &&
+test_expect_success 'tolerate packsizelimit smaller than biggest object' '
+ git config pack.packSizeLimit 1 &&
packname_11=$(git pack-objects test-11 <obj-list) &&
- test $(wc -l <obj-list) = $(ls test-11-*.pack | wc -l)
+ test 5 = $(ls test-11-*.pack | wc -l)
'
test_expect_success 'verify resulting packs' '