aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/sparse-checkout.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 /builtin/sparse-checkout.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 'builtin/sparse-checkout.c')
-rw-r--r--builtin/sparse-checkout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
index f91e29b56a..a5e4b95a9d 100644
--- a/builtin/sparse-checkout.c
+++ b/builtin/sparse-checkout.c
@@ -767,7 +767,7 @@ static int sparse_checkout_add(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix,
builtin_sparse_checkout_add_options,
builtin_sparse_checkout_add_usage,
- PARSE_OPT_KEEP_UNKNOWN);
+ PARSE_OPT_KEEP_UNKNOWN_OPT);
sanitize_paths(argc, argv, prefix, add_opts.skip_checks);
@@ -813,7 +813,7 @@ static int sparse_checkout_set(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix,
builtin_sparse_checkout_set_options,
builtin_sparse_checkout_set_usage,
- PARSE_OPT_KEEP_UNKNOWN);
+ PARSE_OPT_KEEP_UNKNOWN_OPT);
if (update_modes(&set_opts.cone_mode, &set_opts.sparse_index))
return 1;