Skip to content

Commit 17ab51e

Browse files
committed
Merge branch 'rs/grep-no-no-or' into maint-2.42
"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 9a4ae43 + aae8558 commit 17ab51e

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
@@ -990,7 +990,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
990990
OPT_CALLBACK_F(0, "and", &opt, NULL,
991991
N_("combine patterns specified with -e"),
992992
PARSE_OPT_NOARG | PARSE_OPT_NONEG, and_callback),
993-
OPT_BOOL(0, "or", &dummy, ""),
993+
OPT_BOOL_F(0, "or", &dummy, "", PARSE_OPT_NONEG),
994994
OPT_CALLBACK_F(0, "not", &opt, NULL, "",
995995
PARSE_OPT_NOARG | PARSE_OPT_NONEG, not_callback),
996996
OPT_CALLBACK_F('(', NULL, &opt, NULL, "",

0 commit comments

Comments
 (0)