Browse Source

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>
maint
Phil Hord 13 years ago committed by Junio C Hamano
parent
commit
0c80fdb342
  1. 14
      t/t5601-clone.sh

14
t/t5601-clone.sh

@ -206,6 +206,20 @@ test_expect_success 'clone from .git 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

Loading…
Cancel
Save