summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2022-08-19 18:03:57 +0200
committerJunio C Hamano <gitster@pobox.com>2022-08-19 11:13:14 -0700
commit99d86d60e59e11cbc46766346e3e379164a6e4df (patch)
tree01d48b5ff8a6815654379ac8f3ddf939e6b8b9f9 /diff.c
parent80882bc5e7143a0c3823b5a398fd76c9138437ef (diff)
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 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index 974626a621..dd68281ba4 100644
--- a/diff.c
+++ b/diff.c
@@ -5661,7 +5661,7 @@ int diff_opt_parse(struct diff_options *options,
ac = parse_options(ac, av, prefix, options->parseopts, NULL,
PARSE_OPT_KEEP_DASHDASH |
- PARSE_OPT_KEEP_UNKNOWN |
+ PARSE_OPT_KEEP_UNKNOWN_OPT |
PARSE_OPT_NO_INTERNAL_HELP |
PARSE_OPT_ONE_SHOT |
PARSE_OPT_STOP_AT_NON_OPTION);