diff options
author | Junio C Hamano <junkio@cox.net> | 2006-09-27 17:50:52 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-27 23:59:09 -0700 |
commit | 0ab7befa31d07fe3ffb51a6cc626d4c09ded1c92 (patch) | |
tree | e72f754dde2eb05fa8da2c1acfbcf5b03cbdc5e9 /grep.h | |
parent | 2d5b459107cf07bbb307cfb196c2007c497a6dd2 (diff) | |
download | git-0ab7befa31d07fe3ffb51a6cc626d4c09ded1c92.tar.gz |
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>
Diffstat (limited to 'grep.h')
-rw-r--r-- | grep.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |