diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2022-08-19 18:03:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-08-19 11:13:14 -0700 |
commit | 99d86d60e59e11cbc46766346e3e379164a6e4df (patch) | |
tree | 01d48b5ff8a6815654379ac8f3ddf939e6b8b9f9 /t/helper/test-parse-options.c | |
parent | 80882bc5e7143a0c3823b5a398fd76c9138437ef (diff) | |
download | git-99d86d60e59e11cbc46766346e3e379164a6e4df.tar.gz |
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>
Diffstat (limited to 't/helper/test-parse-options.c')
-rw-r--r-- | t/helper/test-parse-options.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c index 88919785d3..99ad6fa4f0 100644 --- a/t/helper/test-parse-options.c +++ b/t/helper/test-parse-options.c @@ -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), |