diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-09-18 13:53:13 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-09-18 13:53:13 -0700 |
| commit | 921a713d66acdc90427ab80c4cb039be73b3ae72 (patch) | |
| tree | 48959c54981008e7256e61b10b3500daef63a7cc /builtin/grep.c | |
| parent | bda494f4043963b9ec9a1ecd4b19b7d1cd9a0518 (diff) | |
| parent | aae8558b1038de452acee672dffca30339f65fa9 (diff) | |
| download | git-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.c | 2 |
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, "", |
