diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-01-25 17:11:30 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-25 17:11:30 -0800 |
commit | 45099df6d7d83b30300f8efa3f6b831d6132c687 (patch) | |
tree | cb111be7f8b0c43958b3833008e1625099f575a5 /t | |
parent | ec74042dc7d81238d2c6d898331ff3b7e12a5d75 (diff) | |
parent | 86ac751859033741a120e9e4a91133d075d9d898 (diff) | |
download | git-45099df6d7d83b30300f8efa3f6b831d6132c687.tar.gz git-45099df6d7d83b30300f8efa3f6b831d6132c687.tar.xz |
Merge branch 'sr/clone-empty'
* sr/clone-empty:
Allow cloning an empty repository
Diffstat (limited to 't')
-rwxr-xr-x | t/t5701-clone-local.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh index 8dfaaa456..fbd9bfa57 100755 --- a/t/t5701-clone-local.sh +++ b/t/t5701-clone-local.sh @@ -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 |