revision.c: reduce implicit dependency the_repository
[gitweb.git] / grep.h
diff --git a/grep.h b/grep.h
index ed25be271b5b6a002fdb582fd5c11a499a4f0c94..1a57d12b906fb07a9041f52b109dcdb4c7478bfa 100644 (file)
--- 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,
@@ -67,6 +69,7 @@ enum grep_color {
        GREP_COLOR_FILENAME,
        GREP_COLOR_FUNCTION,
        GREP_COLOR_LINENO,
+       GREP_COLOR_COLUMNNO,
        GREP_COLOR_MATCH_CONTEXT,
        GREP_COLOR_MATCH_SELECTED,
        GREP_COLOR_SELECTED,
@@ -135,10 +138,12 @@ 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;
        int linenum;
+       int columnnum;
        int invert;
        int ignore_case;
        int status_only;
@@ -161,6 +166,7 @@ struct grep_opt {
        int relative;
        int pathname;
        int null_following_name;
+       int only_matching;
        int color;
        int max_depth;
        int funcname;
@@ -180,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);
@@ -214,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);