aboutsummaryrefslogtreecommitdiff
path: root/grep.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-27 17:50:52 -0700
committerJunio C Hamano <junkio@cox.net>2006-09-27 23:59:09 -0700
commit0ab7befa31d07fe3ffb51a6cc626d4c09ded1c92 (patch)
treee72f754dde2eb05fa8da2c1acfbcf5b03cbdc5e9 /grep.h
parent2d5b459107cf07bbb307cfb196c2007c497a6dd2 (diff)
downloadgit-0ab7befa31d07fe3ffb51a6cc626d4c09ded1c92.tar.gz
git-0ab7befa31d07fe3ffb51a6cc626d4c09ded1c92.tar.xz
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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/grep.h b/grep.h
index af9098cfe..d252dd25f 100644
--- a/grep.h
+++ b/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