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>
Phil Hord committed
Oct 4, 2011 at 16:09 UTC
0c80fdb34200648f18cf19af1514c693d2f141b8
1 file changed
+14
t/t5601-clone.sh
+14
@@ -206,6 +206,20 @@ test_expect_success 'clone from .git file' '
206
git clone dst/.git dst2
207
'
208
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
+
223
test_expect_success 'clone separate gitdir where target already exists' '
224
rm -rf dst &&
225
test_must_fail git clone --separate-git-dir realgitdir src dst