aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-09-18 13:53:13 -0700
committerJunio C Hamano <gitster@pobox.com>2023-09-18 13:53:13 -0700
commit921a713d66acdc90427ab80c4cb039be73b3ae72 (patch)
tree48959c54981008e7256e61b10b3500daef63a7cc /builtin/grep.c
parentbda494f4043963b9ec9a1ecd4b19b7d1cd9a0518 (diff)
parentaae8558b1038de452acee672dffca30339f65fa9 (diff)
downloadgit-921a713d66acdc90427ab80c4cb039be73b3ae72.tar.gz
Merge branch 'rs/grep-no-no-or'
"git grep -e A --no-or -e B" is accepted, even though the negation of "or" did not mean anything, which has been tightened. * rs/grep-no-no-or: grep: reject --no-or
Diffstat (limited to 'builtin/grep.c')
-rw-r--r--builtin/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index f5f5f6dbe1..b71222330a 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -989,7 +989,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
OPT_CALLBACK_F(0, "and", &opt, NULL,
N_("combine patterns specified with -e"),
PARSE_OPT_NOARG | PARSE_OPT_NONEG, and_callback),
- OPT_BOOL(0, "or", &dummy, ""),
+ OPT_BOOL_F(0, "or", &dummy, "", PARSE_OPT_NONEG),
OPT_CALLBACK_F(0, "not", &opt, NULL, "",
PARSE_OPT_NOARG | PARSE_OPT_NONEG, not_callback),
OPT_CALLBACK_F('(', NULL, &opt, NULL, "",