From: Andreas Schwab Date: Sun, 27 Sep 2009 08:01:18 GMT Subject: Re: 'git branch --no-merge' is ambiguous Message-ID: In-Reply-To: <20090927073305.GA15393@coredump.intra.peff.net> Jeff King writes: > -- >8 -- > From: Andreas Schwab > Subject: [PATCH] parse-opt: ignore negation of OPT_NONEG for ambiguity checks > > parse_long_opt always matches both --opt and --no-opt for any option > "opt", and only get_value checks whether --no-opt is actually valid. > Since the options for git branch contains both "no-merged" and "merged" > there are two matches for --no-merge, but no exact match. With this > patch the negation of a NONEG option is rejected earlier, but it changes > the error message from "option `no-opt' isn't available" to "unknown > option `no-opt'". > > [jk: added test] > > Signed-off-by: Jeff King Signed-off-by: Andreas Schwab Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."