parse-options: PARSE_OPT_KEEP_UNKNOWN only applies to --options
The description of 'PARSE_OPT_KEEP_UNKNOWN' starts with "Keep unknown arguments instead of erroring out". This is a bit misleading, as this flag only applies to unknown --options, while non-option arguments are kept even without this flag. Update the description to clarify this, and rename the flag to PARSE_OPTIONS_KEEP_UNKNOWN_OPT to make this obvious just by looking at the flag name. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
80882bc5e7
commit
99d86d60e5
@ -232,9 +232,9 @@ static const struct option test_flag_options[] = {
|
||||
OPT_BIT(0, "keep-argv0", &test_flags,
|
||||
"pass PARSE_OPT_KEEP_ARGV0 to parse_options()",
|
||||
PARSE_OPT_KEEP_ARGV0),
|
||||
OPT_BIT(0, "keep-unknown", &test_flags,
|
||||
"pass PARSE_OPT_KEEP_UNKNOWN to parse_options()",
|
||||
PARSE_OPT_KEEP_UNKNOWN),
|
||||
OPT_BIT(0, "keep-unknown-opt", &test_flags,
|
||||
"pass PARSE_OPT_KEEP_UNKNOWN_OPT to parse_options()",
|
||||
PARSE_OPT_KEEP_UNKNOWN_OPT),
|
||||
OPT_BIT(0, "no-internal-help", &test_flags,
|
||||
"pass PARSE_OPT_NO_INTERNAL_HELP to parse_options()",
|
||||
PARSE_OPT_NO_INTERNAL_HELP),
|
||||
|
Reference in New Issue
Block a user