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>
This commit is contained in:
7
grep.h
7
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;
|
||||
|
Reference in New Issue
Block a user