X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5700-clone-reference.sh;h=4e93aaab02e7b84b4bcf6ac70515e6cf52f0dabc;hb=d8b3a2bf189a9e7fea76454157b77fa71c9abc05;hp=ab00e8fb6a2e3ce77cace23e95fd5f6923a1a932;hpb=9b088c4e394df84232cfd37aea78349a495b09c1;p=git.git diff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh index ab00e8fb6..4e93aaab0 100755 --- a/t/t5700-clone-reference.sh +++ b/t/t5700-clone-reference.sh @@ -22,11 +22,11 @@ echo second > file2 && git add file2 && git commit -m addition && git repack -a -d && -git prune --grace=off' +git prune' cd "$base_dir" -test_expect_success 'cloning with reference' \ +test_expect_success 'cloning with reference (-l -s)' \ 'git clone -l -s --reference B A C' cd "$base_dir" @@ -50,13 +50,35 @@ diff expected current' cd "$base_dir" +test_expect_success 'cloning with reference (no -l -s)' \ +'git clone --reference B file://`pwd`/A D' + +cd "$base_dir" + +test_expect_success 'existence of info/alternates' \ +'test `wc -l expected && +git count-objects > current && +diff expected current' + +cd "$base_dir" + test_expect_success 'updating origin' \ 'cd A && echo third > file3 && git add file3 && git commit -m update && git repack -a -d && -git prune --grace=off' +git prune' cd "$base_dir" @@ -75,4 +97,20 @@ diff expected current' cd "$base_dir" +test_expect_success 'pulling changes from origin' \ +'cd D && +git pull origin' + +cd "$base_dir" + +# the 5 local objects are expected; file3 blob, commit in A to add it +# and its tree, and 2 are our tree and the merge commit. +test_expect_success 'check objects expected to exist locally' \ +'cd D && +echo "5 objects" > expected && +git count-objects | cut -d, -f1 > current && +diff expected current' + +cd "$base_dir" + test_done