{"thread":{"id":"5932","subject":"[PATCH] git-fetch: Understand the branch property remote=\".\"","startedAt":"2006-10-15T21:16:49Z","lastAt":"2006-10-15T21:16:49Z","messageCount":1,"participants":["Santi Béjar"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"28818","messageId":"87bqod9t4u.fsf@gmail.com","threadId":"5932","inReplyTo":null,"subject":"[PATCH] git-fetch: Understand the branch property remote=\".\"","fromName":"Santi Béjar","fromEmail":"sbejar@gmail.com","sentAt":"2006-10-15T21:16:49Z","receivedAt":"2006-10-15T21:16:49Z","isPatch":true,"sender":{"key":"santi@agolina.net","avatar":null},"body":"\nIt extends the branch property \"remote\" to understand that \".\" is the local\nrepository.\n\nWith this, for example, in git.git you could have:\n\n[branch \"next\"]\n  remote=\".\"\n  merge=master\n\nso the default merge in the next branch is the master branch in the\nlocal repository.\n\nSigned-off-by: Santi Béjar <sbejar@gmail.com>\n---\n git-parse-remote.sh |    9 +++++++++\n 1 files changed, 9 insertions(+), 0 deletions(-)\n\ndiff --git a/git-parse-remote.sh b/git-parse-remote.sh\nindex 679f73c..617d022 100755\n--- a/git-parse-remote.sh\n+++ b/git-parse-remote.sh\n@@ -187,6 +187,15 @@ get_remote_refs_for_push () {\n }\n \n get_remote_refs_for_fetch () {\n+\tif [ \"$#,$1\" = \"1,.\" ] ;\n+\tthen\n+\t    curr_branch=$(git-symbolic-ref HEAD | sed -e 's|^refs/heads/||')\n+\t    branch_remote=$(git-repo-config --get \"branch.$curr_branch.remote\")\n+\t    if [ \"$branch_remote\" = \".\" ]\n+\t    then\n+\t\tset . $(git-repo-config --get-all \"branch.${curr_branch}.merge\")\n+\t    fi\n+\tfi\n \tcase \"$#\" in\n \t0)\n \t    die \"internal error: get-remote-refs-for-fetch.\" ;;\n-- \n1.4.3.rc2.ga442\n"}]}