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

[PATCH v2 13/14] t/t5515-fetch-merge-logic: don't use {branches,remotes}-file

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 22, 2013, 07:58 UTC
Message-ID
<1371887901-5659-14-git-send-email-artagnon@gmail.com>
In-Reply-To
<1371887901-5659-1-git-send-email-artagnon@gmail.com>

Replace it with the equivalent gitconfig configuration, using the results of the corresponding tests in t/t5505-remote.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 t/t5515-fetch-merge-logic.sh | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh
index dbb927d..cde44e0 100755
--- a/t/t5515-fetch-merge-logic.sh
+++ b/t/t5515-fetch-merge-logic.sh
@@ -55,27 +55,25 @@ test_expect_success setup '
 	git config remote.config-glob.fetch refs/heads/*:refs/remotes/rem/* &&
 	remotes="$remotes config-glob" &&
 
-	mkdir -p .git/remotes &&
-	{
-		echo "URL: ../.git/"
-		echo "Pull: refs/heads/master:remotes/rem/master"
-		echo "Pull: refs/heads/one:remotes/rem/one"
-		echo "Pull: two:remotes/rem/two"
-		echo "Pull: refs/heads/three:remotes/rem/three"
-	} >.git/remotes/remote-explicit &&
+	git config remote.remote-explicit.url ../.git/ &&
+	git config remote.remote-explicit.fetch refs/heads/master:remotes/rem/master &&
+	git config --add remote.remote-explicit.fetch refs/heads/one:remotes/rem/one &&
+	git config --add remote.remote-explicit.fetch two:remotes/rem/two &&
+	git config --add remote.remote-explicit.fetch refs/heads/three:remotes/rem/three &&
 	remotes="$remotes remote-explicit" &&
 
-	{
-		echo "URL: ../.git/"
-		echo "Pull: refs/heads/*:refs/remotes/rem/*"
-	} >.git/remotes/remote-glob &&
+	git config remote.remote-glob.url ../.git/ &&
+	git config remote.remote-glob.fetch refs/heads/*:refs/remotes/rem/* &&
 	remotes="$remotes remote-glob" &&
 
-	mkdir -p .git/branches &&
-	echo "../.git" > .git/branches/branches-default &&
+	git config remote.branches-default.url ../.git/ &&
+	git config remote.branches-default.fetch refs/heads/master:refs/heads/branches-default &&
+	git config remote.branches-default.push HEAD:refs/heads/master &&
 	remotes="$remotes branches-default" &&
 
-	echo "../.git#one" > .git/branches/branches-one &&
+	git config remote.branches-one.url ../.git/ &&
+	git config remote.branches-one.fetch refs/heads/one:refs/heads/branches-one &&
+	git config remote.branches-one.push HEAD:refs/heads/one &&
 	remotes="$remotes branches-one" &&
 
 	for remote in $remotes ; do
-- 
1.8.3.1.498.gacf2885
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 23 of 25 in “Classify {branches,remotes}-file as fringe features”
  1. 00/14 Classify {branches,remotes}-file as fringe featuresRamkumar Ramachandra, Jun 22, 2013
  2. 01/14 t/t5505-remote: modernize styleRamkumar Ramachandra, Jun 22, 2013
  3. Junio C HamanoJun 23, 2013
  4. Ramkumar RamachandraJun 23, 2013
  5. 02/14 t/t5505-remote: test push-refspec in branches-fileRamkumar Ramachandra, Jun 22, 2013
  6. 03/14 t/t5505-remote: use test_path_is_missingRamkumar Ramachandra, Jun 22, 2013
  7. 04/14 t/t5505-remote: remove dependency on $origin_urlRamkumar Ramachandra, Jun 22, 2013
  8. 05/14 remote: remove dead code in read_branches_file()Ramkumar Ramachandra, Jun 22, 2013
  9. Junio C HamanoJun 23, 2013
  10. 06/14 t/t5505-remote: test url-with-# in branches-fileRamkumar Ramachandra, Jun 22, 2013
  11. 07/14 t/t5516-fetch-push: don't use branches-fileRamkumar Ramachandra, Jun 22, 2013
  12. 08/14 ls-remote doc: fix example invocation on git.gitRamkumar Ramachandra, Jun 22, 2013
  13. Junio C HamanoJun 23, 2013
  14. Ramkumar RamachandraJun 23, 2013
  15. Junio C HamanoJun 23, 2013
  16. 09/14 ls-remote doc: rewrite <repository> paragraphRamkumar Ramachandra, Jun 22, 2013
  17. 10/14 ls-remote doc: don't encourage use of branches-fileRamkumar Ramachandra, Jun 22, 2013
  18. 11/14 t/t5505-remote: test multiple push/pull in remotes-fileRamkumar Ramachandra, Jun 22, 2013
  19. Junio C HamanoJun 23, 2013
  20. Ramkumar RamachandraJun 23, 2013
  21. Junio C HamanoJun 23, 2013
  22. 12/14 t/t5510-fetch: don't use remotes-fileRamkumar Ramachandra, Jun 22, 2013
  23. 13/14 t/t5515-fetch-merge-logic: don't use {branches,remotes}-fileRamkumar Ramachandra, Jun 22, 2013
  24. 14/14 remote: add comment about read_{branches,remotes}_fileRamkumar Ramachandra, Jun 22, 2013
  25. Ramkumar RamachandraJun 25, 2013

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.