Re: [BUG] potential error in parsing git checkout options?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guillaume Pages <guillaume.pages@xxxxxxxxxxxxxxxxxxxxxxx> 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/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]