]> git.ipfire.org Git - thirdparty/git.git/commitdiff
parse-options: clarify what "negated" means for PARSE_OPT_NONEG
authorMichael Montalbo <mmontalbo@gmail.com>
Tue, 12 May 2026 18:10:23 +0000 (18:10 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 May 2026 01:13:26 +0000 (10:13 +0900)
The documentation says the flag prevents an option from being
"negated" without specifying what that means. Add a parenthetical
to clarify that it rejects the "--no-<option>" form.

Signed-off-by: Michael Montalbo <mmontalbo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
parse-options.h

index 706de9729f6b3f00b41f21251ca7fe6c2c982d79..0d1f738f8d8671e5eb8da731178a1b0d8071c70e 100644 (file)
@@ -117,6 +117,7 @@ typedef int parse_opt_subcommand_fn(int argc, const char **argv,
  *   PARSE_OPT_OPTARG: says that the argument is optional (not for BOOLEANs)
  *   PARSE_OPT_NOARG: says that this option does not take an argument
  *   PARSE_OPT_NONEG: says that this option cannot be negated
+ *                   (i.e. rejects "--no-<option>")
  *   PARSE_OPT_HIDDEN: this option is skipped in the default usage, and
  *                     shown only in the full usage.
  *   PARSE_OPT_LASTARG_DEFAULT: says that this option will take the default