Skip to content

Commit

Permalink
Add test showing git-fetch groks gitfiles
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Phil Hord authored and Junio C Hamano committed Oct 4, 2011
1 parent 7ab8777 commit 0c80fdb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions t/t5601-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c80fdb

Please sign in to comment.