git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Phil Hord <hordp@cisco.com>
Date
Oct 5, 2011, 13:35 UTC
Message-ID
<4E8C5D31.2000406@cisco.com>

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>
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
Next: Nguyen Thai Ngoc Duy
Message 1 of 2 in “[PATCHv3 5/5] Add test showing git-fetch groks gitfiles”
  1. Phil HordOct 5, 2011
  2. Nguyen Thai Ngoc DuyOct 6, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.