aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper/test-serve-v2.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 /t/helper/test-serve-v2.c
parentapi-parse-options.txt: fix description of OPT_CMDMODE (diff)
downloadgit-99d86d60e59e11cbc46766346e3e379164a6e4df.tar.gz
git-99d86d60e59e11cbc46766346e3e379164a6e4df.zip
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-serve-v2.c')
-rw-r--r--t/helper/test-serve-v2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/helper/test-serve-v2.c b/t/helper/test-serve-v2.c
index 28e905afc3..824e5c0a95 100644
--- a/t/helper/test-serve-v2.c
+++ b/t/helper/test-serve-v2.c
@@ -24,7 +24,7 @@ int cmd__serve_v2(int argc, const char **argv)
/* ignore all unknown cmdline switches for now */
argc = parse_options(argc, argv, prefix, options, serve_usage,
PARSE_OPT_KEEP_DASHDASH |
- PARSE_OPT_KEEP_UNKNOWN);
+ PARSE_OPT_KEEP_UNKNOWN_OPT);
if (advertise_capabilities)
protocol_v2_advertise_capabilities();