diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-09-23 09:47:05 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-23 09:47:05 -0700 |
commit | 28ecef4c84af0b3300b84e73d2a7749e9a4ac83f (patch) | |
tree | a49ccba002c03112965e659fe84d197869abab53 /grep.h | |
parent | The seventh batch (diff) | |
parent | grep: store grep_source buffer as const (diff) | |
download | tgif-28ecef4c84af0b3300b84e73d2a7749e9a4ac83f.tar.xz |
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.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 */ |