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:
2
grep.h
2
grep.h
@ -35,6 +35,7 @@ enum grep_expr_node {
|
||||
|
||||
struct grep_expr {
|
||||
enum grep_expr_node node;
|
||||
unsigned hit;
|
||||
union {
|
||||
struct grep_pat *atom;
|
||||
struct grep_expr *unary;
|
||||
@ -59,6 +60,7 @@ struct grep_opt {
|
||||
unsigned count:1;
|
||||
unsigned word_regexp:1;
|
||||
unsigned fixed:1;
|
||||
unsigned all_match:1;
|
||||
#define GREP_BINARY_DEFAULT 0
|
||||
#define GREP_BINARY_NOMATCH 1
|
||||
#define GREP_BINARY_TEXT 2
|
||||
|
Reference in New Issue
Block a user