{"thread":{"id":"5913","subject":"[PATCH] git-fetch: Allow branch.\"branchname\".remote=.","startedAt":"2006-10-13T07:50:12Z","lastAt":"2006-10-13T13:06:07Z","messageCount":7,"participants":["Santi Béjar","Junio C Hamano","Santi","Johannes Schindelin","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"28715","messageId":"87y7rk3b9n.fsf@gmail.com","threadId":"5913","inReplyTo":null,"subject":"[PATCH] git-fetch: Allow branch.\"branchname\".remote=.","fromName":"Santi Béjar","fromEmail":"sbejar@gmail.com","sentAt":"2006-10-13T07:50:12Z","receivedAt":"2006-10-13T07:50:12Z","isPatch":true,"sender":{"key":"santi@agolina.net","avatar":null},"body":"\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"},{"id":"28717","messageId":"7vpscwd4ya.fsf@assigned-by-dhcp.cox.net","threadId":"5913","inReplyTo":"87y7rk3b9n.fsf@gmail.com","subject":"Re: [PATCH] git-fetch: Allow branch.\"branchname\".remote=.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-13T07:56:29Z","receivedAt":"2006-10-13T07:56:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Santi Béjar <sbejar@gmail.com> writes:\n\n<nothing>\n\n> Signed-off-by: Santi Béjar <sbejar@gmail.com>\n\nWhat does it do?\n"},{"id":"28718","messageId":"8aa486160610130208s67ea0746o8a54910860b3fb78@mail.gmail.com","threadId":"5913","inReplyTo":"7vpscwd4ya.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-fetch: Allow branch.\"branchname\".remote=.","fromName":"Santi","fromEmail":"sbejar@gmail.com","sentAt":"2006-10-13T09:08:53Z","receivedAt":"2006-10-13T09:08:53Z","isPatch":true,"sender":{"key":"santi@agolina.net","avatar":null},"body":"2006/10/13, Junio C Hamano <junkio@cox.net>:\n> Santi Béjar <sbejar@gmail.com> writes:\n>\n>\n> What does it do?\n>\n\nIt allows to define that the default remote repository is the local\none. 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\nSanti\n"},{"id":"28720","messageId":"Pine.LNX.4.63.0610131324090.14200@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5913","inReplyTo":"8aa486160610130208s67ea0746o8a54910860b3fb78@mail.gmail.com","subject":"Re: [PATCH] git-fetch: Allow branch.\"branchname\".remote=.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-10-13T11:27:21Z","receivedAt":"2006-10-13T11:27:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 13 Oct 2006, Santi wrote:\n\n> For example, in git.git you could have:\n> \n> [branch \"next\"]\n>   remote=\".\"\n>   merge=master\n> \n> so the default merge in the next branch is the master branch in the\n> local repository.\n\nThere is a subtle problem here. Up until now, \"remote\" meant a short cut. \nYou either had a file with that name in .git/remotes/ or .git/branches, or \nan entry in the config (remote.<name>.url).\n\nYou use it differently here, designating the URL instead of the remote. \nI'd rather have it point to a real remote.\n\nCiao,\nDscho\n"},{"id":"28721","messageId":"ego1ea$tsn$1@sea.gmane.org","threadId":"5913","inReplyTo":"Pine.LNX.4.63.0610131324090.14200@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] git-fetch: Allow branch.\"branchname\".remote=.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-13T12:39:47Z","receivedAt":"2006-10-13T12:39:47Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Johannes Schindelin wrote:\n\n> There is a subtle problem here. Up until now, \"remote\" meant a short cut. \n> You either had a file with that name in .git/remotes/ or .git/branches, or \n> an entry in the config (remote.<name>.url).\n\nNot exactly. \"git-pull . <branch>\" and \"git-peek-remote .\" meant use\n_current_ repository. \".\" as remote name means \"current\", i.e. local \nrepository.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"28722","messageId":"Pine.LNX.4.63.0610131448390.14200@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5913","inReplyTo":"ego1ea$tsn$1@sea.gmane.org","subject":"Re: [PATCH] git-fetch: Allow branch.\"branchname\".remote=.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-10-13T12:53:31Z","receivedAt":"2006-10-13T12:53:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 13 Oct 2006, Jakub Narebski wrote:\n\n> Johannes Schindelin wrote:\n> \n> > There is a subtle problem here. Up until now, \"remote\" meant a short cut. \n> > You either had a file with that name in .git/remotes/ or .git/branches, or \n> > an entry in the config (remote.<name>.url).\n> \n> Not exactly. \"git-pull . <branch>\" and \"git-peek-remote .\" meant use\n> _current_ repository. \".\" as remote name means \"current\", i.e. local \n> repository.\n\n>From Documentation/git-pull.txt:\n\n\tSYNOPSIS\n\t--------\n\t'git-pull' <options> <repository> <refspec>...\n\nIt says \"repository\", not \"remote\". As for the name \"git-peek-remote\": \nyes, it is a short cut for \"remote repository\".\n\nThe thing is, if you say you pull \"from a remote\", then it is not \nsufficient to specify just a URL of a repository. You also have to specify \na branch.\n\nFor git-peek-remote and git-ls-remote, you only need a URL.\n\nIf you mix the usage, people get as confused as with the terms \"pull\", \n\"update\" and \"merge\".\n\nCiao,\nDscho\n"},{"id":"28725","messageId":"ego2vm$568$1@sea.gmane.org","threadId":"5913","inReplyTo":"Pine.LNX.4.63.0610131448390.14200@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] git-fetch: Allow branch.\"branchname\".remote=.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-13T13:06:07Z","receivedAt":"2006-10-13T13:06:07Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"<opublikowany i wysłany>\n\nJohannes Schindelin wrote:\n\n\n> On Fri, 13 Oct 2006, Jakub Narebski wrote:\n> \n>> Johannes Schindelin wrote:\n>> \n>> > There is a subtle problem here. Up until now, \"remote\" meant a short cut. \n>> > You either had a file with that name in .git/remotes/ or .git/branches, or \n>> > an entry in the config (remote.<name>.url).\n>> \n>> Not exactly. \"git-pull . <branch>\" and \"git-peek-remote .\" meant use\n>> _current_ repository. \".\" as remote name means \"current\", i.e. local \n>> repository.\n> \n> From Documentation/git-pull.txt:\n> \n>       SYNOPSIS\n>       --------\n>       'git-pull' <options> <repository> <refspec>...\n> \n> It says \"repository\", not \"remote\". As for the name \"git-peek-remote\": \n> yes, it is a short cut for \"remote repository\".\n> \n> The thing is, if you say you pull \"from a remote\", then it is not \n> sufficient to specify just a URL of a repository. You also have to specify \n> a branch.\n\nO.K. \"remote\" = \"repository + set of branches\". But we can say that \".\"\nis a default remote, which points to local repository (\".\") and has\nno branches information.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"}]}