All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] potential error in parsing git checkout options?
       [not found] <156258182.144342.1432895411512.JavaMail.zimbra@ensimag.grenoble-inp.fr>
@ 2015-05-29 10:30 ` Guillaume Pages
  2015-05-29 12:23   ` Matthieu Moy
  0 siblings, 1 reply; 2+ messages in thread
From: Guillaume Pages @ 2015-05-29 10:30 UTC (permalink / raw)
  To: git
  Cc: Matthieu Moy, Remi Lespinet, Remi Galan, Antoine Delaite,
	Louis-Alexandre Stuber

Git version : 2.4.1.652.g8fd8657 

When we run git checkout -babar, we would expect an error message like 
"unknown switch 'a' " and we get "Switched to a new branch 'abar'". We 
are not sure since we don't entirely understand the syntax -b <branch> 
which is shown in the documentation, but as average users, we found it 
a bit surprising. 


Guillaume Pagès

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [BUG] potential error in parsing git checkout options?
  2015-05-29 10:30 ` [BUG] potential error in parsing git checkout options? Guillaume Pages
@ 2015-05-29 12:23   ` Matthieu Moy
  0 siblings, 0 replies; 2+ messages in thread
From: Matthieu Moy @ 2015-05-29 12:23 UTC (permalink / raw)
  To: Guillaume Pages
  Cc: git, Remi Lespinet, Remi Galan, Antoine Delaite,
	Louis-Alexandre Stuber

Guillaume Pages <guillaume.pages@ensimag.grenoble-inp.fr> writes:

> Git version : 2.4.1.652.g8fd8657 
>
> When we run git checkout -babar, we would expect an error message like 
> "unknown switch 'a' " and we get "Switched to a new branch 'abar'".

Yes, the option-parser accepts sticked form (-bbranch) and unsticked (-b
branch). This is the convention with most Unix commands (try "grep -e
foo" Vs "grep -efoo").

It gets more confusing for "git -amend" Vs "git --amend", which got a
special-case to avoid confusion (strictly speaking, it should have been
equivalent to "git commit -a -m end").

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-29 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <156258182.144342.1432895411512.JavaMail.zimbra@ensimag.grenoble-inp.fr>
2015-05-29 10:30 ` [BUG] potential error in parsing git checkout options? Guillaume Pages
2015-05-29 12:23   ` Matthieu Moy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.