diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-02-08 16:22:04 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-08 16:22:04 -0800 |
commit | 8566311a03f8fbb185b6c8524d7eb4a74017bd4f (patch) | |
tree | 8b5017ad819ded2ab4c925e7c1119f33ba1666a8 | |
parent | 878f8c42dc22d0f5f6bb7f76935239ced0e1cea3 (diff) | |
parent | 53ded839aee86e3544c3e035385fe2ada33180b1 (diff) | |
download | git-8566311a03f8fbb185b6c8524d7eb4a74017bd4f.tar.gz |
Merge branch 'jc/sparse-checkout-set-default-fix' into maint-2.43
"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 5c8ffb1f75..2ce1c53d01 100644 --- a/builtin/sparse-checkout.c +++ b/builtin/sparse-checkout.c @@ -835,7 +835,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 { |