X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5700-clone-reference.sh;h=6d432525934980050f5c0d1683a1bc5e220b6e18;hb=563b43ee45b87cf1e4bba99d3d0216f396d5c873;hp=52dab2d484fa84b4f766d176c6d78952732d8f5b;hpb=74d20040cafdced657efbf49795183d209a3a07b;p=git.git diff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh index 52dab2d48..6d4325259 100755 --- a/t/t5700-clone-reference.sh +++ b/t/t5700-clone-reference.sh @@ -17,7 +17,7 @@ git commit -m initial' cd "$base_dir" test_expect_success 'preparing second repository' \ -'git_clone A B && cd B && +'git clone A B && cd B && echo second > file2 && git add file2 && git commit -m addition && @@ -26,8 +26,8 @@ git prune' cd "$base_dir" -test_expect_success 'cloning with reference' \ -'git_clone -l -s --reference B A C' +test_expect_success 'cloning with reference (-l -s)' \ +'git clone -l -s --reference B A C' cd "$base_dir" @@ -50,6 +50,28 @@ diff expected current' cd "$base_dir" +test_expect_success 'cloning with reference (no -l -s)' \ +'git clone --reference B 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 && @@ -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