format-patch: mark "--no-numbered" option with NONEG

We have separate parse-options entries for "numbered" and "no-numbered", which means that we accept "--no-no-numbered". It does not behave sensibly, though (it ignores the "unset" flag and acts like "--no-numbered"). We could fix that, but obviously this is silly and unintentional. Let's just disallow it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Nov 5, 2018 at 01:41 UTC 964fd83b12cbf7907f0bdb4671a467fe381487d3
1 file changed +1 -1
builtin/log.c
+1 -1
@@ -1508,7 +1508,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
1508 PARSE_OPT_NOARG, numbered_callback },
1509 { OPTION_CALLBACK, 'N', "no-numbered", &numbered, NULL,
1510 N_("use [PATCH] even with multiple patches"),
1511 - PARSE_OPT_NOARG, no_numbered_callback },
1511 + PARSE_OPT_NOARG | PARSE_OPT_NONEG, no_numbered_callback },
1512 OPT_BOOL('s', "signoff", &do_signoff, N_("add Signed-off-by:")),
1513 OPT_BOOL(0, "stdout", &use_stdout,
1514 N_("print patches to standard out")),