aboutsummaryrefslogtreecommitdiff
path: root/grep.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-20 12:39:46 -0700
committerJunio C Hamano <junkio@cox.net>2006-09-20 12:39:46 -0700
commit480c1ca6fd8df58a783e231648b489ed2bfd17f1 (patch)
tree01627f1db5e68b2472da416e3acf512fc0084567 /grep.h
parenta2ed6ae402582a3ee76e9b4639848eba261a12de (diff)
downloadgit-480c1ca6fd8df58a783e231648b489ed2bfd17f1.tar.gz
git-480c1ca6fd8df58a783e231648b489ed2bfd17f1.tar.xz
Update grep internal for grepping only in head/body
This further updates the built-in grep engine so that we can say something like "this pattern should match only in head". This can be used to simplify grepping in the log messages. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'grep.h')
-rw-r--r--grep.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/grep.h b/grep.h
index 80122b05d..0b503ea66 100644
--- a/grep.h
+++ b/grep.h
@@ -3,6 +3,8 @@
enum grep_pat_token {
GREP_PATTERN,
+ GREP_PATTERN_HEAD,
+ GREP_PATTERN_BODY,
GREP_AND,
GREP_OPEN_PAREN,
GREP_CLOSE_PAREN,
@@ -10,6 +12,11 @@ enum grep_pat_token {
GREP_OR,
};
+enum grep_context {
+ GREP_CONTEXT_HEAD,
+ GREP_CONTEXT_BODY,
+};
+
struct grep_pat {
struct grep_pat *next;
const char *origin;