{"thread":{"id":"25362","subject":"Re: git push <branch-name>","startedAt":"2010-10-05T22:11:44Z","lastAt":"2010-10-06T13:41:35Z","messageCount":3,"participants":["Daniel Johnson","Eric Raible","Sebastian Harl"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"152730","messageId":"201010051811.49211.ComputerDruid@gmail.com","threadId":"25362","inReplyTo":null,"subject":"Re: git push <branch-name>","fromName":"Daniel Johnson","fromEmail":"computerdruid@gmail.com","sentAt":"2010-10-05T22:11:44Z","receivedAt":"2010-10-05T22:11:44Z","isPatch":false,"sender":{"key":"computerdruid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/34696?v=4"},"body":"On Tuesday 05 October 2010 16:29:50 you wrote:\n> A newbie colleague asked why: \"git push <branch>\" didn't work.\n> \n> Although I know that \"git push <repo> <branch>\" is the correct\n> syntax, I think that he has a point.  If branch.<branch>.remote\n> is defined it seems unambiguous to me.\n> \n> So I can't see any reason NOT to dwimify\n> \n>     git push <branch>\nIsn't that syntax reserved for remotes?\nfor example:\n\ngit push origin\n\nI feel like it would be a bad idea to have these 2 types of invocations \noverlap in syntax like that.\n"},{"id":"152731","messageId":"AANLkTi=sDDXRKuHf93cZ4fSVpZFvgyB+k934qg7gDL9T@mail.gmail.com","threadId":"25362","inReplyTo":"201010051811.49211.ComputerDruid@gmail.com","subject":"Re: git push <branch-name>","fromName":"Eric Raible","fromEmail":"raible@gmail.com","sentAt":"2010-10-05T22:28:56Z","receivedAt":"2010-10-05T22:28:56Z","isPatch":false,"sender":{"key":"raible@gmail.com","avatar":null},"body":"On Tue, Oct 5, 2010 at 3:11 PM, Daniel Johnson <computerdruid@gmail.com> wrote:\n> Isn't that syntax reserved for remotes?\n> for example:\n>\n> git push origin\n>\n> I feel like it would be a bad idea to have these 2 types of invocations\n> overlap in syntax like that.\n\nThe idea is that given \"git push <branch>\" if <branch> is NOT a remote but\nIS a branch name then git could unambiguously provide the correct remote.\n\nNaturally if there's a branch and a remote of the same name then for backwards\ncompatibility the remote would be chosen.\n"},{"id":"152760","messageId":"20101006134135.GS26193@chough.tokkee.org","threadId":"25362","inReplyTo":"AANLkTi=sDDXRKuHf93cZ4fSVpZFvgyB+k934qg7gDL9T@mail.gmail.com","subject":"Re: git push <branch-name>","fromName":"Sebastian Harl","fromEmail":"tokkee@debian.org","sentAt":"2010-10-06T13:41:35Z","receivedAt":"2010-10-06T13:41:35Z","isPatch":false,"sender":{"key":"tokkee@debian.org","avatar":null},"body":"Hi,\n\nOn Tue, Oct 05, 2010 at 03:28:56PM -0700, Eric Raible wrote:\n> On Tue, Oct 5, 2010 at 3:11 PM, Daniel Johnson <computerdruid@gmail.com> wrote:\n> > Isn't that syntax reserved for remotes?\n> > for example:\n> >\n> > git push origin\n> >\n> > I feel like it would be a bad idea to have these 2 types of invocations\n> > overlap in syntax like that.\n> \n> The idea is that given \"git push <branch>\" if <branch> is NOT a remote but\n> IS a branch name then git could unambiguously provide the correct remote.\n> \n> Naturally if there's a branch and a remote of the same name then for backwards\n> compatibility the remote would be chosen.\n\nPlease don't do that. Imho, this introduces too much magic in the\nbehavior of git-pull, making it less intuitive to understand and, thus\nerror-prone.\n\nCheers,\nSebastian\n\n-- \nSebastian \"tokkee\" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/\n\nThose who would give up Essential Liberty to purchase a little Temporary\nSafety, deserve neither Liberty nor Safety.         -- Benjamin Franklin\n\n"}]}