aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/sparse-checkout.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-01-08 14:05:16 -0800
committerJunio C Hamano <gitster@pobox.com>2024-01-08 14:05:16 -0800
commit863c596e68894984eeac8b8ea3e644ae941aa694 (patch)
treed93b589c156760cc02286b9e435da32c1c52ee8d /builtin/sparse-checkout.c
parentMerge branch 'en/header-cleanup' (diff)
parentsparse-checkout: use default patterns for 'set' only !stdin (diff)
downloadgit-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.c2
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 {