[PATCH v2 4/4] parse-options: clarify what "negated" means for PARSE_OPT_NONEG
- From
Michael Montalbo via GitGitGadget <gitgitgadget@gmail.com>
- Date
- May 12, 2026, 18:10 UTC
- Message-ID
- <3a656f8c0fb52a2949041dec55619acea9c117df.1778609423.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.2105.v2.git.1778609423.gitgitgadget@gmail.com>
From: Michael Montalbo <mmontalbo@gmail.com>
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> --- parse-options.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/parse-options.h b/parse-options.h index 706de9729f..0d1f738f8d 100644 --- a/parse-options.h +++ b/parse-options.h @@ -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
-- gitgitgadget