git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Git List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 15/16] t/t5515-fetch-merge-logic: don't use {branches,remotes}-file
Date: Fri, 21 Jun 2013 16:42:39 +0530	[thread overview]
Message-ID: <1371813160-4200-16-git-send-email-artagnon@gmail.com> (raw)
In-Reply-To: <1371813160-4200-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.499.g7ad3486.dirty

  parent reply	other threads:[~2013-06-21 11:16 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-21 11:12 [PATCH 00/16] Cleanup {branches,remotes}-file cruft Ramkumar Ramachandra
2013-06-21 11:12 ` [PATCH 01/16] t/t5505-remote: modernize subshell-style of one test Ramkumar Ramachandra
2013-06-21 22:04   ` Junio C Hamano
2013-06-22  6:24     ` Ramkumar Ramachandra
2013-06-21 11:12 ` [PATCH 02/16] t/t5505-remote: test push-refspec in branches-file Ramkumar Ramachandra
2013-06-21 22:08   ` Junio C Hamano
2013-06-21 11:12 ` [PATCH 03/16] t/t5505-remote: use test_path_is_missing Ramkumar Ramachandra
2013-06-21 11:12 ` [PATCH 04/16] t/t5505-remote: remove dependency on $origin_url Ramkumar Ramachandra
2013-06-21 22:10   ` Junio C Hamano
2013-06-22  6:27     ` Ramkumar Ramachandra
2013-06-22 21:10       ` Junio C Hamano
2013-06-23  7:51         ` Ramkumar Ramachandra
2013-06-21 11:12 ` [PATCH 05/16] remote: remove dead code in read_branches_file() Ramkumar Ramachandra
2013-06-21 22:26   ` Junio C Hamano
2013-06-22  7:36     ` Ramkumar Ramachandra
2013-06-23  8:07       ` Junio C Hamano
2013-06-23  8:37         ` Ramkumar Ramachandra
2013-06-23 21:15           ` Junio C Hamano
2013-06-21 11:12 ` [PATCH 06/16] t/t5505-remote: test url-with-# in branches-file Ramkumar Ramachandra
2013-06-21 22:28   ` Junio C Hamano
2013-06-22  7:16     ` Ramkumar Ramachandra
2013-06-21 11:12 ` [PATCH 07/16] t/t5516-fetch-push: don't use branches-file Ramkumar Ramachandra
2013-06-21 22:29   ` Junio C Hamano
2013-06-21 11:12 ` [PATCH 08/16] t/t5516-fetch-push: use test_config() Ramkumar Ramachandra
2013-06-21 22:32   ` Junio C Hamano
2013-06-22  7:15     ` Ramkumar Ramachandra
2013-06-22  9:57     ` Johannes Sixt
2013-06-21 11:12 ` [PATCH 09/16] ls-remote doc: fix example invocation on git.git Ramkumar Ramachandra
2013-06-21 22:38   ` Junio C Hamano
2013-06-21 11:12 ` [PATCH 10/16] ls-remote doc: rewrite <repository> paragraph Ramkumar Ramachandra
2013-06-21 22:39   ` Junio C Hamano
2013-06-21 11:12 ` [PATCH 11/16] ls-remote doc: don't encourage use of branches-file Ramkumar Ramachandra
2013-06-21 11:12 ` [PATCH 12/16] t/t5505-remote: modernize subshell-style of one test Ramkumar Ramachandra
2013-06-21 11:12 ` [PATCH 13/16] t/t5505-remote: test multiple push/pull in remotes-file Ramkumar Ramachandra
2013-06-21 22:53   ` Eric Sunshine
2013-06-22  7:41     ` Ramkumar Ramachandra
2013-06-21 11:12 ` [PATCH 14/16] t/t5510-fetch: don't use remotes-file Ramkumar Ramachandra
2013-06-21 11:12 ` Ramkumar Ramachandra [this message]
2013-06-21 11:12 ` [PATCH 16/16] remote: deprecate read_{branches,remotes}_file Ramkumar Ramachandra
2013-06-21 14:32 ` [PATCH 00/16] Cleanup {branches,remotes}-file cruft Junio C Hamano
2013-06-21 16:22   ` Ramkumar Ramachandra
2013-06-21 16:33   ` Junio C Hamano
2013-06-21 19:09     ` Ramkumar Ramachandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371813160-4200-16-git-send-email-artagnon@gmail.com \
    --to=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).