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

[PATCH] git-fetch: Allow branch."branchname".remote=.

From
SBSanti Béjar <sbejar@gmail.com>
Date
Oct 13, 2006, 07:50 UTC
Message-ID
<87y7rk3b9n.fsf@gmail.com>
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
Next: Junio C Hamano
Message 1 of 7 in “git-fetch: Allow branch."branchname".remote=.”
  1. git-fetch: Allow branch."branchname".remote=.Santi Béjar, Oct 13, 2006
  2. Junio C HamanoOct 13, 2006
  3. SantiOct 13, 2006
  4. Johannes SchindelinOct 13, 2006
  5. Jakub NarebskiOct 13, 2006
  6. Johannes SchindelinOct 13, 2006
  7. Jakub NarebskiOct 13, 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.