Thread (58 messages) 58 messages, 7 authors, 2021-12-23

[PATCH v4 04/10] sparse-checkout: disallow --no-stdin as an argument to set

STALE1745d REVIEWED: 2 (0M)

From: Elijah Newren via GitGitGadget <hidden>
Date: 2021-12-14 04:09:25
Subsystem: the rest · Maintainer: Linus Torvalds

2 review trailers.

From: Elijah Newren <redacted>

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 <redacted>
Reviewed-by: Derrick Stolee <redacted>
Reviewed-by: Victoria Dye <redacted>
Signed-off-by: Elijah Newren <redacted>
---
 builtin/sparse-checkout.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
index eb8fbd36b0b..387903eafe7 100644
--- a/builtin/sparse-checkout.c
+++ b/builtin/sparse-checkout.c
@@ -699,8 +699,9 @@ static struct sparse_checkout_set_opts {
 static int sparse_checkout_set(int argc, const char **argv, const char *prefix)
 {
 	static struct option builtin_sparse_checkout_set_options[] = {
-		OPT_BOOL(0, "stdin", &set_opts.use_stdin,
-			 N_("read patterns from standard in")),
+		OPT_BOOL_F(0, "stdin", &set_opts.use_stdin,
+			   N_("read patterns from standard in"),
+			   PARSE_OPT_NONEG),
 		OPT_END(),
 	};
 
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help