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

[PATCH 4/4 (take 4)] Add test for the default merges in fetch.

From
SBSanti Béjar <sbejar@gmail.com>
Date
Sep 23, 2006, 20:55 UTC
Message-ID
<87sliie20o.fsf@gmail.com>
In-Reply-To
<87ac4qfgvc.fsf@gmail.com>
Signed-off-by: Santi Béjar <sbejar@gmail.com>
---
 t/t5510-fetch.sh |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index e71581a..c7faffe
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -27,6 +27,16 @@ test_expect_success "clone and setup chi
 		echo "URL: ../one/.git/"
 		echo "Pull: refs/heads/master:refs/heads/one"
 	} >.git/remotes/one
+	cd .. &&
+	git clone . three &&
+	cd three &&
+	git repo-config branch.master.remote two
+	git repo-config branch.master.merge refs/heads/one
+	{
+		echo "URL: ../two/.git/"
+		echo "Pull: refs/heads/master:refs/heads/two"
+		echo "Pull: refs/heads/one:refs/heads/one"
+	} >.git/remotes/two
 '
 
 test_expect_success "fetch test" '
@@ -41,4 +51,17 @@ test_expect_success "fetch test" '
 	test "z$mine" = "z$his"
 '
 
+test_expect_success "fetch test for-merge" '
+	cd "$D" &&
+	cd three &&
+	git fetch &&
+	test -f .git/refs/heads/two &&
+	test -f .git/refs/heads/one &&
+	{
+		echo -e "not-for-merge	branch \047master\047 of ../two/"
+		echo -e "	branch \047one\047 of ../two/"
+	} > expected &&
+	cut -f 2- .git/FETCH_HEAD > actual &&
+	diff expected actual'
+
 test_done
-- 
1.4.2.1.g279b
Previous: Santi BéjarNext: Junio C Hamano
Message 5 of 6 in “Fetch: branch properties for fetch.”
  1. 0/4 Fetch: branch properties for fetch.Santi Béjar, Sep 23, 2006
  2. 1/4 fetch: default remote repository from branch propertiesSanti Béjar, Sep 23, 2006
  3. 2/4 Add t5510 to test per branch configuration affecting git-fetch.Santi Béjar, Sep 23, 2006
  4. 3/4 fetch: get the remote branches to merge from the branch propertiesSanti Béjar, Sep 23, 2006
  5. 4/4 Add test for the default merges in fetch.Santi Béjar, Sep 23, 2006
  6. Junio C HamanoSep 24, 2006

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.