Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/grep.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-09-23 19:47:05 +0300
committerJunio C Hamano <gitster@pobox.com>2021-09-23 19:47:05 +0300
commit28ecef4c84af0b3300b84e73d2a7749e9a4ac83f (patch)
treea49ccba002c03112965e659fe84d197869abab53 /grep.h
parent99c99ed8259bf070cd8ae7b51a94904b7cf5c161 (diff)
parent1e66871608d1f6f4cd66e899ee33755bbf6deafa (diff)
Merge branch 'jk/grep-haystack-is-read-only' into hm/paint-hits-in-log-grep
* jk/grep-haystack-is-read-only: grep: store grep_source buffer as const grep: mark "haystack" buffers as const grep: stop modifying buffer in grep_source_1() grep: stop modifying buffer in show_line() grep: stop modifying buffer in strip_timestamp
Diffstat (limited to 'grep.h')
-rw-r--r--grep.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/grep.h b/grep.h
index 128007db65..3cb8a83ae8 100644
--- 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 */