]> git.ipfire.org Git - thirdparty/git.git/blobdiff - grep.h
grep: store grep_source buffer as const
[thirdparty/git.git] / grep.h
diff --git a/grep.h b/grep.h
index 128007db655e4e2def53e17cfd2a0d0ee3fefa18..3cb8a83ae8ca584bc1b3f7a5d0e9dd6b92381777 100644 (file)
--- a/grep.h
+++ b/grep.h
@@ -189,7 +189,7 @@ void append_grep_pattern(struct grep_opt *opt, const char *pat, const char *orig
 void append_header_grep_pattern(struct grep_opt *, enum grep_header_field, const char *);
 void compile_grep_patterns(struct grep_opt *opt);
 void free_grep_patterns(struct grep_opt *opt);
-int grep_buffer(struct grep_opt *opt, char *buf, unsigned long size);
+int grep_buffer(struct grep_opt *opt, const char *buf, unsigned long size);
 
 struct grep_source {
        char *name;
@@ -202,7 +202,7 @@ struct grep_source {
        void *identifier;
        struct repository *repo; /* if GREP_SOURCE_OID */
 
-       char *buf;
+       const char *buf;
        unsigned long size;
 
        char *path; /* for attribute lookups */