Skip to content

Commit 8566311

Browse files
committed
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
2 parents 878f8c4 + 53ded83 commit 8566311

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/sparse-checkout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ static int sparse_checkout_set(int argc, const char **argv, const char *prefix)
835835
* non-cone mode, if nothing is specified, manually select just the
836836
* top-level directory (much as 'init' would do).
837837
*/
838-
if (!core_sparse_checkout_cone && argc == 0) {
838+
if (!core_sparse_checkout_cone && !set_opts.use_stdin && argc == 0) {
839839
argv = default_patterns;
840840
argc = default_patterns_nr;
841841
} else {

0 commit comments

Comments
 (0)