X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5300-pack-object.sh;h=983a39398f17dc2b261771e780e8c010f038a12a;hb=6d2c1c2dc064c40f6c723e0a25b5f813732fdaff;hp=f1106e65422823288f25add874d366afa5ea99f1;hpb=d25430c5f88c7e7b4ce24c1b08e409f4345c4eb9;p=git.git diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh index f1106e654..983a39398 100755 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@ -15,7 +15,7 @@ test_expect_success \ 'rm -f .git/index* for i in a b c do - dd if=/dev/zero bs=4k count=1 | tr "\\0" $i >$i && + dd if=/dev/zero bs=4k count=1 | perl -pe "y/\\000/$i/" >$i && git update-index --add $i || return 1 done && cat c >d && echo foo >>d && git update-index --add d && @@ -264,8 +264,109 @@ test_expect_success \ cp -f .git/objects/9d/235ed07cd19811a6ceb342de82f190e49c9f68 \ .git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67' -test_expect_failure \ +test_expect_success \ 'make sure index-pack detects the SHA1 collision' \ - 'git-index-pack -o bad.idx test-3.pack' + '! git-index-pack -o bad.idx test-3.pack' + +test_expect_success \ + 'honor pack.packSizeLimit' \ + 'git config pack.packSizeLimit 200 && + packname_4=$(git pack-objects test-4 LIST && + rm -f .git/index && + git update-index --index-info LIST && + rm -f .git/index && + git update-index --index-info