summaryrefslogtreecommitdiff
path: root/grep.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-09-21 17:57:23 +0200
committerJunio C Hamano <gitster@pobox.com>2018-09-21 09:48:10 -0700
commit38bbc2ea39372ce1b7eb494b31948f4a8a903f88 (patch)
tree12f62127a9530fb5397cb5e36122590f8b47915e /grep.h
parent6afaf807859bd671a3f8e9101952e648a1a5e1a9 (diff)
downloadgit-38bbc2ea39372ce1b7eb494b31948f4a8a903f88.tar.gz
grep.c: remove implicit dependency on the_index
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'grep.h')
-rw-r--r--grep.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/grep.h b/grep.h
index 0ba62a11c5..3651183971 100644
--- a/grep.h
+++ b/grep.h
@@ -36,6 +36,8 @@ typedef int pcre2_jit_stack;
#include "thread-utils.h"
#include "userdiff.h"
+struct repository;
+
enum grep_pat_token {
GREP_PATTERN,
GREP_PATTERN_HEAD,
@@ -136,6 +138,7 @@ struct grep_opt {
struct grep_pat *header_list;
struct grep_pat **header_tail;
struct grep_expr *pattern_expression;
+ struct repository *repo;
const char *prefix;
int prefix_length;
regex_t regexp;
@@ -183,9 +186,9 @@ struct grep_opt {
void *output_priv;
};
-extern void init_grep_defaults(void);
+extern void init_grep_defaults(struct repository *);
extern int grep_config(const char *var, const char *value, void *);
-extern void grep_init(struct grep_opt *, const char *prefix);
+extern void grep_init(struct grep_opt *, struct repository *repo, const char *prefix);
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);