grep --all-match
This lets you say: git grep --all-match -e A -e B -e C to find lines that match A or B or C but limit the matches from the files that have all of A, B and C. This is different from git grep -e A --and -e B --and -e C in that the latter looks for a single line that has all of these at the same time. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
@ -596,6 +596,10 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
|
||||
GREP_CLOSE_PAREN);
|
||||
continue;
|
||||
}
|
||||
if (!strcmp("--all-match", arg)) {
|
||||
opt.all_match = 1;
|
||||
continue;
|
||||
}
|
||||
if (!strcmp("-e", arg)) {
|
||||
if (1 < argc) {
|
||||
append_grep_pattern(&opt, argv[1],
|
||||
|
Reference in New Issue
Block a user