diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-01-08 14:05:16 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-01-08 14:05:16 -0800 |
| commit | 863c596e68894984eeac8b8ea3e644ae941aa694 (patch) | |
| tree | d93b589c156760cc02286b9e435da32c1c52ee8d /builtin/sparse-checkout.c | |
| parent | Merge branch 'en/header-cleanup' (diff) | |
| parent | sparse-checkout: use default patterns for 'set' only !stdin (diff) | |
| download | git-863c596e68894984eeac8b8ea3e644ae941aa694.tar.gz git-863c596e68894984eeac8b8ea3e644ae941aa694.zip | |
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
Diffstat (limited to 'builtin/sparse-checkout.c')
| -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 { |
