{"thread":{"id":"50915","subject":"Git merge should report an actual syntax error when a semicolon is used instead of space for specifying multiple branches","startedAt":"2019-04-11T01:13:02Z","lastAt":"2019-04-12T15:21:34Z","messageCount":4,"participants":["ron","Junio C Hamano","Ron"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"373623","messageId":"fQ_n3UAoz-yQ8MMCgPLhVDqkMCqpXQ2Dk34IZgksKIQ1B3Sig_T70nPI5mI0z9z2A5ZLdk5ooUYnAJelV-7eMNrnCr4V73Rz87pP1arR8WA=@protonmail.com","threadId":"50915","inReplyTo":null,"subject":"Git merge should report an actual syntax error when a semicolon is used instead of space for specifying multiple branches","fromName":"ron","fromEmail":"ronazek@protonmail.com","sentAt":"2019-04-11T01:12:51Z","receivedAt":"2019-04-11T01:13:02Z","isPatch":false,"sender":{"key":"ronazek@protonmail.com","avatar":null},"body":"First time reporting a bug :) or at least what I think it may be.\n\nThere's a few similar cases I think I've seen in the past, but the one I'm sure about is the semicolon instead of space between multiple branches, that should be a syntax error if git merge can't accept that command .. if the people I spoke with are correct; However, git merge reports it as \"not something we can merge\" implying that it suppose to be valid syntax and that it's just not allowed function or that it may be temporairly not possible due to a circumstance (a secondary condition), as if I was mistyping the name of the branch or something, but if it never accepts anything with a semicolon it ought to be a syntax error, IMO.\nAnd it may not be uncommon since it comes from the fact that git merge normally follows git fetch where semicolon is supported as per normal.\n\nRon\n\nSent with ProtonMail Secure Email.\n"},{"id":"373711","messageId":"xmqqsgunya8j.fsf@gitster-ct.c.googlers.com","threadId":"50915","inReplyTo":"fQ_n3UAoz-yQ8MMCgPLhVDqkMCqpXQ2Dk34IZgksKIQ1B3Sig_T70nPI5mI0z9z2A5ZLdk5ooUYnAJelV-7eMNrnCr4V73Rz87pP1arR8WA=@protonmail.com","subject":"Re: Git merge should report an actual syntax error when a semicolon is used instead of space for specifying multiple branches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-12T07:05:16Z","receivedAt":"2019-04-12T07:05:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"ron <ronazek@protonmail.com> writes:\n\n> ... And it may not be uncommon since it comes from the fact that\n> git merge normally follows git fetch where semicolon is supported\n> as per normal.\n\nI do not know what \"git fetch\" uses semicolon for here.  Care to\nelaborate?\n"},{"id":"373746","messageId":"NVqJoDneX4bKnXsESFmcKt_7jDQE8Wk9l_F9rkNcnplXgV8TVjfbaMIhKfZ2v9BwJrJ2QJYcq-E6UdshPdhKttO4bIUGdsbs0zZUPNwQvUY=@protonmail.com","threadId":"50915","inReplyTo":"xmqqsgunya8j.fsf@gitster-ct.c.googlers.com","subject":"Re: Git merge should report an actual syntax error when a semicolon is used instead of space for specifying multiple branches","fromName":"Ron","fromEmail":"ronazek@protonmail.com","sentAt":"2019-04-12T13:37:06Z","receivedAt":"2019-04-12T13:37:13Z","isPatch":false,"sender":{"key":"ronazek@protonmail.com","avatar":null},"body":"> Junio C Hamano <gitster@pobox.com> wrote:\n\n> I do not know what \"git fetch\" uses semicolon for here. Care to\n> elaborate?\n\nThose were all typos, I meant colon, two dots. Sorry.\n\n\n"},{"id":"373750","messageId":"xmqqd0lrxn9i.fsf@gitster-ct.c.googlers.com","threadId":"50915","inReplyTo":"NVqJoDneX4bKnXsESFmcKt_7jDQE8Wk9l_F9rkNcnplXgV8TVjfbaMIhKfZ2v9BwJrJ2QJYcq-E6UdshPdhKttO4bIUGdsbs0zZUPNwQvUY=@protonmail.com","subject":"Re: Git merge should report an actual syntax error when a semicolon is used instead of space for specifying multiple branches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-12T15:21:29Z","receivedAt":"2019-04-12T15:21:34Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ron <ronazek@protonmail.com> writes:\n\n>> I do not know what \"git fetch\" uses semicolon for here. Care to\n>> elaborate?\n>\n> Those were all typos, I meant colon, two dots. Sorry.\n\nDo you mean to say that because you can say\n\n\t$ git fetch origin +master:refs/remotes/origin/master\n\nyou expected that you can say this?\n\n\t$ git merge +master:refs/remotes/origin/master\n\nThe \"git merge\" command takes one or more commit-ishes to be merged\nto the current branch on its command line, and the above command\nline is correct at the syntax level.\n\nBut because 'master:refs/remotes/origin/master' does not name a\ncommit-ish, it is the right thing to barf, saying that it is not\nsomething the command can merge.\n\nIf you replace the colon with space, that would mean an entirely\ndifferent thing, i.e.\n\n\t$ git merge master refs/remotes/origin/master\n\nwould mean \"I want two commit-ishes, the tip of my 'master' branch,\nand the last observed commit at the tip of the 'master' branch at\nthe 'origin' repository, merged into the branch that is currently\nchecked out, making an octopus merge\".  It also is syntactically\ncorrect, but it may not be what you wanted to do.  Most likely, you\nwould have rather wanted to do one of these:\n\n\t$ git merge refs/remotes/origin/master\n\t$ git merge origin/master\n\t$ git merge origin\n\nIn any case, because the \"what to fetch, followed by where to store\nit, separated by a colon, with how to store it optionally signalled\nby a leading plus sign\" argument syntax used by \"git fetch\" must\nconvey a lot more (and different kind of) information than \"which\ncommit to merge to the currently checked-out branch\" argument syntax\nused by \"git merge\", these two commands have to take quite different\nkind of information and use quite different ways to express these\ntwo kinds of information at the syntax level.  The 'master' on the\nleft-hand-side of the colon used by \"git fetch\" does not even name\nthe 'master' branch _you_ have, while \"git merge\" that is a totally\nlocal operation only can name a commit-ish object that is locally\navailable (e.g. a request to merge the 'master' branch you have\nwould say \"git merge master\").\n"}]}