mirror of
https://github.com/git/git.git
synced 2026-01-12 13:53:11 +09:00
grep: reject --no-or
Since 3e230fa1b2 (grep: use parseopt, 2009-05-07) git grep has been accepting the option --no-or. It does the same as --or: nothing. That's confusing and unintended. Forbid negating --or. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
0d1bd1dfb3
commit
aae8558b10
@ -976,7 +976,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, "",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user