Skip to content

Commit 921a713

Browse files
committed
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
2 parents bda494f + aae8558 commit 921a713

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/grep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
989989
OPT_CALLBACK_F(0, "and", &opt, NULL,
990990
N_("combine patterns specified with -e"),
991991
PARSE_OPT_NOARG | PARSE_OPT_NONEG, and_callback),
992-
OPT_BOOL(0, "or", &dummy, ""),
992+
OPT_BOOL_F(0, "or", &dummy, "", PARSE_OPT_NONEG),
993993
OPT_CALLBACK_F(0, "not", &opt, NULL, "",
994994
PARSE_OPT_NOARG | PARSE_OPT_NONEG, not_callback),
995995
OPT_CALLBACK_F('(', NULL, &opt, NULL, "",

0 commit comments

Comments
 (0)