aboutsummaryrefslogtreecommitdiff
path: root/t/t5601-clone.sh
diff options
context:
space:
mode:
authorPhil Hord <phil.hord@gmail.com>2011-10-04 16:09:23 -0400
committerJunio C Hamano <gitster@pobox.com>2011-10-04 13:38:12 -0700
commit0c80fdb34200648f18cf19af1514c693d2f141b8 (patch)
tree48c7c808159e69789cbbff47fdab60f1a5847440 /t/t5601-clone.sh
parent7ab8777e8dd365e9a5dc06eb3042903e296ef1b0 (diff)
downloadgit-0c80fdb34200648f18cf19af1514c693d2f141b8.tar.gz
git-0c80fdb34200648f18cf19af1514c693d2f141b8.tar.xz
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 <hordp@cisco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5601-clone.sh')
-rwxr-xr-xt/t5601-clone.sh14
1 files changed, 14 insertions, 0 deletions
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