{"thread":{"id":"39458","subject":"[BUG] potential error in parsing git checkout options?","startedAt":"2015-05-29T10:30:21Z","lastAt":"2015-05-29T12:23:02Z","messageCount":2,"participants":["Guillaume Pages","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"262401","messageId":"854038739.144343.1432895421483.JavaMail.zimbra@ensimag.grenoble-inp.fr","threadId":"39458","inReplyTo":"156258182.144342.1432895411512.JavaMail.zimbra@ensimag.grenoble-inp.fr","subject":"[BUG] potential error in parsing git checkout options?","fromName":"Guillaume Pages","fromEmail":"guillaume.pages@ensimag.grenoble-inp.fr","sentAt":"2015-05-29T10:30:21Z","receivedAt":"2015-05-29T10:30:21Z","isPatch":false,"sender":{"key":"guillaume.pages@ensimag.grenoble-inp.fr","avatar":null},"body":"Git version : 2.4.1.652.g8fd8657 \n\nWhen we run git checkout -babar, we would expect an error message like \n\"unknown switch 'a' \" and we get \"Switched to a new branch 'abar'\". We \nare not sure since we don't entirely understand the syntax -b <branch> \nwhich is shown in the documentation, but as average users, we found it \na bit surprising. \n\n\nGuillaume Pagès\n"},{"id":"262419","messageId":"vpqiobb7eu1.fsf@anie.imag.fr","threadId":"39458","inReplyTo":"854038739.144343.1432895421483.JavaMail.zimbra@ensimag.grenoble-inp.fr","subject":"Re: [BUG] potential error in parsing git checkout options?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2015-05-29T12:23:02Z","receivedAt":"2015-05-29T12:23:02Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Guillaume Pages <guillaume.pages@ensimag.grenoble-inp.fr> writes:\n\n> Git version : 2.4.1.652.g8fd8657 \n>\n> When we run git checkout -babar, we would expect an error message like \n> \"unknown switch 'a' \" and we get \"Switched to a new branch 'abar'\".\n\nYes, the option-parser accepts sticked form (-bbranch) and unsticked (-b\nbranch). This is the convention with most Unix commands (try \"grep -e\nfoo\" Vs \"grep -efoo\").\n\nIt gets more confusing for \"git -amend\" Vs \"git --amend\", which got a\nspecial-case to avoid confusion (strictly speaking, it should have been\nequivalent to \"git commit -a -m end\").\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"}]}