Skip to content

Commit 863c596

Browse files
committed
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
2 parents 492ee03 + 53ded83 commit 863c596

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
@@ -831,7 +831,7 @@ static int sparse_checkout_set(int argc, const char **argv, const char *prefix)
831831
* non-cone mode, if nothing is specified, manually select just the
832832
* top-level directory (much as 'init' would do).
833833
*/
834-
if (!core_sparse_checkout_cone && argc == 0) {
834+
if (!core_sparse_checkout_cone && !set_opts.use_stdin && argc == 0) {
835835
argv = default_patterns;
836836
argc = default_patterns_nr;
837837
} else {

0 commit comments

Comments
 (0)