From: Andreas Schwab Date: Fri, 25 Sep 2009 18:44:44 +0000 (+0200) Subject: parse-opt: ignore negation of OPT_NONEG for ambiguity checks X-Git-Tag: v1.6.5-rc3~19 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/6bbfd1fa98b0c1fa1684bd35e64404799f0cc2b3?hp=6bbfd1fa98b0c1fa1684bd35e64404799f0cc2b3 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: Andreas Schwab Signed-off-by: Jeff King Signed-off-by: Shawn O. Pearce ---