threads / patch / 28576

patch, 4 partsAdd test showing git-fetch groks gitfiles

Subject: [PATCH 4/4] Add test showing git-fetch groks gitfiles

## tl;dr

One message between Oct 4, 2011 and Oct 4, 2011. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Phil Hord· Oct 4, 2011, 20:09 UTC · lore

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>
Show changes to t/t5601-clone.sh +14 −0
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.503.g26392.dirty

← back to recent threads