diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-01-09 01:05:16 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-01-09 01:05:16 +0300 |
commit | 863c596e68894984eeac8b8ea3e644ae941aa694 (patch) | |
tree | d93b589c156760cc02286b9e435da32c1c52ee8d | |
parent | 492ee03f60297e7e83d101f4519ab8abc98782bc (diff) | |
parent | 53ded839aee86e3544c3e035385fe2ada33180b1 (diff) |
Merge branch 'jc/sparse-checkout-set-default-fix'
"git sparse-checkout set" added default patterns even when the
patterns are being fed from the standard input, which has been
corrected.
* jc/sparse-checkout-set-default-fix:
sparse-checkout: use default patterns for 'set' only !stdin
-rw-r--r-- | builtin/sparse-checkout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c index 80227f3df1..288a832c8d 100644 --- a/builtin/sparse-checkout.c +++ b/builtin/sparse-checkout.c @@ -831,7 +831,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 { |