[PATCHv3 5/5] Add test showing git-fetch groks gitfiles

Subsystems: the rest

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCHv3 5/5] Add test showing git-fetch groks gitfiles

From: Phil Hord <hidden>
Date: 2016-06-15 22:52:11

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 <redacted>
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index e810314..87ee016 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -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
-- 
1.7.7.505.ga09f6

Re: [PATCHv3 5/5] Add test showing git-fetch groks gitfiles

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:52:11

On Thu, Oct 6, 2011 at 12:35 AM, Phil Hord [off-list ref] wrote:
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.
It'd be interesting to test failed cases too. I can think of two: .git
file is not a valid file and .git points to an invalid repo.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help