summaryrefslogtreecommitdiff
path: root/grep.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-10-03 21:47:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-10-10 06:21:29 (GMT)
commitc5c31d3381d11903c01d51aff4437fe9f76d0268 (patch)
tree682b0c58edeca691a127934e7d22063208ab3b10 /grep.h
parent7687a0541e0a6d86c5005d84057321368181c1b5 (diff)
downloadgit-c5c31d3381d11903c01d51aff4437fe9f76d0268.zip
git-c5c31d3381d11903c01d51aff4437fe9f76d0268.tar.gz
git-c5c31d3381d11903c01d51aff4437fe9f76d0268.tar.bz2
grep: move pattern-type bits support to top-level grep.[ch]
Switching between -E/-G/-P/-F correctly needs a lot more than just flipping opt->regflags bit these days, and we have a nice helper function buried in builtin/grep.c for the sole use of "git grep". Extract it so that "log --grep" family can also use it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 9aa1cc7..701c784 100644
--- a/grep.h
+++ b/grep.h
@@ -141,6 +141,8 @@ struct grep_opt {
extern void init_grep_defaults(void);
extern int grep_config(const char *var, const char *value, void *);
extern void grep_init(struct grep_opt *, const char *prefix);
+void grep_set_pattern_type_option(enum grep_pattern_type, struct grep_opt *opt);
+void grep_commit_pattern_type(enum grep_pattern_type, struct grep_opt *opt);
extern void append_grep_pat(struct grep_opt *opt, const char *pat, size_t patlen, const char *origin, int no, enum grep_pat_token t);
extern void append_grep_pattern(struct grep_opt *opt, const char *pat, const char *origin, int no, enum grep_pat_token t);