From: Phil Hord Date: Tue, 4 Oct 2011 20:09:23 +0000 (-0400) Subject: Add test showing git-fetch groks gitfiles X-Git-Tag: v1.7.8-rc0~31^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0c80fdb34200648f18cf19af1514c693d2f141b8;p=git.git Add test showing git-fetch groks gitfiles Add a test for two subtly different cases: 'git fetch path/.git' and 'git fetch path' to confirm that transport recognizes both paths as git repositories when using the gitfile mechanism. Signed-off-by: Phil Hord Signed-off-by: Junio C Hamano --- diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index e8103144b..87ee01662 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@ -206,6 +206,20 @@ test_expect_success 'clone from .git file' ' git clone dst/.git dst2 ' +test_expect_success 'fetch from .git gitfile' ' + ( + cd dst2 && + git fetch ../dst/.git + ) +' + +test_expect_success 'fetch from gitfile parent' ' + ( + cd dst2 && + git fetch ../dst + ) +' + test_expect_success 'clone separate gitdir where target already exists' ' rm -rf dst && test_must_fail git clone --separate-git-dir realgitdir src dst