summaryrefslogtreecommitdiff
path: root/grep.h
diff options
context:
space:
mode:
Diffstat (limited to 'grep.h')
-rw-r--r--grep.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/grep.h b/grep.h
index 0ba62a11c5..1a57d12b90 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);
@@ -217,7 +220,8 @@ void grep_source_init(struct grep_source *gs, enum grep_source_type type,
const void *identifier);
void grep_source_clear_data(struct grep_source *gs);
void grep_source_clear(struct grep_source *gs);
-void grep_source_load_driver(struct grep_source *gs);
+void grep_source_load_driver(struct grep_source *gs,
+ struct index_state *istate);
int grep_source(struct grep_opt *opt, struct grep_source *gs);