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 коммит произвёл Junio C Hamano
Родитель 7ab8777e8d
Коммит 0c80fdb342
1 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -206,6 +206,20 @@ test_expect_success 'clone from .git file' '
git clone dst/.git dst2 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' ' test_expect_success 'clone separate gitdir where target already exists' '
rm -rf dst && rm -rf dst &&
test_must_fail git clone --separate-git-dir realgitdir src dst test_must_fail git clone --separate-git-dir realgitdir src dst