diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-11-02 16:53:17 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-11-02 16:53:18 +0900 |
commit | 17ab51ee8ffcecc62813fe6c744cabb924f3fc9f (patch) | |
tree | 8a97eb3d423eea04fe31c009faf65e3394181b00 | |
parent | 9a4ae43f0bbdf1b36d40ba9d0efb8d1bc8a9ce4d (diff) | |
parent | aae8558b1038de452acee672dffca30339f65fa9 (diff) | |
download | git-17ab51ee8ffcecc62813fe6c744cabb924f3fc9f.tar.gz |
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
-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 50e712a184..2a261074f1 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -990,7 +990,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, "", |