Skip to content

Commit f85751a

Browse files
newrengitster
authored andcommitted
sparse-checkout: disallow --no-stdin as an argument to set
We intentionally added --stdin as an option to `sparse-checkout set`, but didn't intend for --no-stdin to be permitted as well. Reported-by: Victoria Dye <[email protected]> Reviewed-by: Derrick Stolee <[email protected]> Reviewed-by: Victoria Dye <[email protected]> Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 45c5e47 commit f85751a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

builtin/sparse-checkout.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,9 @@ static struct sparse_checkout_set_opts {
699699
static int sparse_checkout_set(int argc, const char **argv, const char *prefix)
700700
{
701701
static struct option builtin_sparse_checkout_set_options[] = {
702-
OPT_BOOL(0, "stdin", &set_opts.use_stdin,
703-
N_("read patterns from standard in")),
702+
OPT_BOOL_F(0, "stdin", &set_opts.use_stdin,
703+
N_("read patterns from standard in"),
704+
PARSE_OPT_NONEG),
704705
OPT_END(),
705706
};
706707

0 commit comments

Comments
 (0)