X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5701-clone-local.sh;h=3559d179647035a6ad8783aabfbecb8edcd4c254;hb=74b11bc3beca489502d0840e4c558a5fcc44e145;hp=8dfaaa456e115e85e36c438bb998d8053534104e;hpb=6233a5210ef64ba31bbf0e867e03e9176e0aace9;p=git.git diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh index 8dfaaa456..3559d1796 100755 --- a/t/t5701-clone-local.sh +++ b/t/t5701-clone-local.sh @@ -11,8 +11,8 @@ test_expect_success 'preparing origin repository' ' git clone --bare . x && test "$(GIT_CONFIG=a.git/config git config --bool core.bare)" = true && test "$(GIT_CONFIG=x/config git config --bool core.bare)" = true - git bundle create b1.bundle --all HEAD && - git bundle create b2.bundle --all && + git bundle create b1.bundle --all && + git bundle create b2.bundle master && mkdir dir && cp b1.bundle dir/b3 cp b1.bundle b4 @@ -116,4 +116,20 @@ test_expect_success 'bundle clone with nonexistent HEAD' ' test ! -e .git/refs/heads/master ' +test_expect_success 'clone empty repository' ' + cd "$D" && + mkdir empty && + (cd empty && git init) && + git clone empty empty-clone && + test_tick && + (cd empty-clone + echo "content" >> foo && + git add foo && + git commit -m "Initial commit" && + git push origin master && + expected=$(git rev-parse master) && + actual=$(git --git-dir=../empty/.git rev-parse master) && + test $actual = $expected) +' + test_done