path: root/grep.h
diff options
authorJunio C Hamano <>2012-10-09 23:17:50 (GMT)
committerJunio C Hamano <>2012-10-09 23:17:50 (GMT)
commit7687a0541e0a6d86c5005d84057321368181c1b5 (patch)
tree159dbf096726f174631cff9b27ec9fc834e71665 /grep.h
parent15fabd1bbd4c997d0edb2249295e2717bc18b6c7 (diff)
grep: move the configuration parsing logic to grep.[ch]
The configuration handling is a library-ish part of this program, that is not specific to "git grep" command. It should be reusable by "log" and others. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'grep.h')
1 files changed, 4 insertions, 0 deletions
diff --git a/grep.h b/grep.h
index c256ac6..9aa1cc7 100644
--- a/grep.h
+++ b/grep.h
@@ -138,6 +138,10 @@ struct grep_opt {
void *output_priv;
+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);
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);
extern void append_header_grep_pattern(struct grep_opt *, enum grep_header_field, const char *);