X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft9300-fast-import.sh;h=131f03298809ad193cc75ab77deda6daaf713d1f;hb=6a843348ab08e7c701ac2343ffbe2d11ecb7ebab;hp=60d6f5d1ba7d5421c4c364e070e35bdb024b3b4a;hpb=4ca1b623865a9dc100f95a7867e35a9f73d7507a;p=git.git diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 60d6f5d1b..131f03298 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -1536,4 +1536,50 @@ test_expect_success 'R: ignore non-git options' ' git fast-import expect +cat >input < $GIT_COMMITTER_DATE +data <>input +cat >>input <>input +echo >>input + +test_expect_success \ + 'R: blob bigger than threshold' \ + 'test_create_repo R && + git --git-dir=R/.git fast-import --big-file-threshold=1 verify && + for p in R/.git/objects/pack/*.pack; + do + git verify-pack -v $p >>verify || exit; + done' +test_expect_success \ + 'R: verify written objects' \ + 'git --git-dir=R/.git cat-file blob big-file:big1 >actual && + test_cmp expect actual && + a=$(git --git-dir=R/.git rev-parse big-file:big1) && + b=$(git --git-dir=R/.git rev-parse big-file:big2) && + test $a = $b' +test_expect_success \ + 'R: blob appears only once' \ + 'n=$(grep $a verify | wc -l) && + test 1 = $n' + test_done