Skip to content

Commit 0c80fdb

Browse files
phordgitster
authored andcommitted
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>
1 parent 7ab8777 commit 0c80fdb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

t/t5601-clone.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,20 @@ test_expect_success 'clone from .git file' '
206206
git clone dst/.git dst2
207207
'
208208

209+
test_expect_success 'fetch from .git gitfile' '
210+
(
211+
cd dst2 &&
212+
git fetch ../dst/.git
213+
)
214+
'
215+
216+
test_expect_success 'fetch from gitfile parent' '
217+
(
218+
cd dst2 &&
219+
git fetch ../dst
220+
)
221+
'
222+
209223
test_expect_success 'clone separate gitdir where target already exists' '
210224
rm -rf dst &&
211225
test_must_fail git clone --separate-git-dir realgitdir src dst

0 commit comments

Comments
 (0)