git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-fetch: Allow branch."branchname".remote=.
@ 2006-10-13  7:50 Santi Béjar
  2006-10-13  7:56 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Santi Béjar @ 2006-10-13  7:50 UTC (permalink / raw)
  To: Git Mailing List


Signed-off-by: Santi Béjar <sbejar@gmail.com>
---
 git-parse-remote.sh |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 679f73c..617d022 100755
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -187,6 +187,15 @@ get_remote_refs_for_push () {
 }
 
 get_remote_refs_for_fetch () {
+	if [ "$#,$1" = "1,." ] ;
+	then
+	    curr_branch=$(git-symbolic-ref HEAD | sed -e 's|^refs/heads/||')
+	    branch_remote=$(git-repo-config --get "branch.$curr_branch.remote")
+	    if [ "$branch_remote" = "." ]
+	    then
+		set . $(git-repo-config --get-all "branch.${curr_branch}.merge")
+	    fi
+	fi
 	case "$#" in
 	0)
 	    die "internal error: get-remote-refs-for-fetch." ;;
-- 
1.4.3.rc2.ga442

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-10-13 13:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-13  7:50 [PATCH] git-fetch: Allow branch."branchname".remote= Santi Béjar
2006-10-13  7:56 ` Junio C Hamano
2006-10-13  9:08   ` Santi
2006-10-13 11:27     ` Johannes Schindelin
2006-10-13 12:39       ` Jakub Narebski
2006-10-13 12:53         ` Johannes Schindelin
2006-10-13 13:06           ` Jakub Narebski

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).