diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:36 +0000 |
commit | 037de004c68d704abf839eebe075c58c9603f8f3 (patch) | |
tree | 7ac13a7fbb70193e7d04fc193f75de839e914d45 /builtin/sparse-checkout.c | |
parent | Adding upstream version 1:2.43.0. (diff) | |
download | git-upstream/1%2.45.1.tar.xz git-upstream/1%2.45.1.zip |
Adding upstream version 1:2.45.1.upstream/1%2.45.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'builtin/sparse-checkout.c')
-rw-r--r-- | builtin/sparse-checkout.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c index 5c8ffb1..0f52e25 100644 --- a/builtin/sparse-checkout.c +++ b/builtin/sparse-checkout.c @@ -8,14 +8,10 @@ #include "parse-options.h" #include "pathspec.h" #include "repository.h" -#include "run-command.h" #include "strbuf.h" #include "string-list.h" -#include "cache-tree.h" #include "lockfile.h" -#include "resolve-undo.h" #include "unpack-trees.h" -#include "wt-status.h" #include "quote.h" #include "setup.h" #include "sparse-index.h" @@ -777,8 +773,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_OPT); + builtin_sparse_checkout_add_usage, 0); sanitize_paths(argc, argv, prefix, add_opts.skip_checks); @@ -824,8 +819,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_OPT); + builtin_sparse_checkout_set_usage, 0); if (update_modes(&set_opts.cone_mode, &set_opts.sparse_index)) return 1; @@ -835,7 +829,7 @@ static int sparse_checkout_set(int argc, const char **argv, const char *prefix) * non-cone mode, if nothing is specified, manually select just the * top-level directory (much as 'init' would do). */ - if (!core_sparse_checkout_cone && argc == 0) { + if (!core_sparse_checkout_cone && !set_opts.use_stdin && argc == 0) { argv = default_patterns; argc = default_patterns_nr; } else { @@ -996,8 +990,7 @@ static int sparse_checkout_check_rules(int argc, const char **argv, const char * argc = parse_options(argc, argv, prefix, builtin_sparse_checkout_check_rules_options, - builtin_sparse_checkout_check_rules_usage, - PARSE_OPT_KEEP_UNKNOWN_OPT); + builtin_sparse_checkout_check_rules_usage, 0); if (check_rules_opts.rules_file && check_rules_opts.cone_mode < 0) check_rules_opts.cone_mode = 1; |