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>
This commit is contained in:
Phil Hord 2011-10-04 16:09:23 -04:00 committed by Junio C Hamano
parent 7ab8777e8d
commit 0c80fdb342

View File

@ -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