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-11-01 23:48:08 +0300
committerJunio C Hamano <gitster@pobox.com>2021-11-01 23:48:08 +0300
commitb93d7206919e9eac22b3ca0291bce8da65960595 (patch)
tree1fb405da58548ea2246aa833630706a9ab9bf928 /grep.h
parent7e27bd589d328b9daf154c2444d1a86ec3afedb0 (diff)
parentae39ba431ab861548eb60b4bd2e1d8b8813db76f (diff)
Merge branch 'hm/paint-hits-in-log-grep'
"git log --grep=string --author=name" learns to highlight hits just like "git grep string" does. * hm/paint-hits-in-log-grep: grep/pcre2: fix an edge case concerning ascii patterns and UTF-8 data pretty: colorize pattern matches in commit messages grep: refactor next_match() and match_one_pattern() for external use
Diffstat (limited to 'grep.h')
-rw-r--r--grep.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/grep.h b/grep.h
index 3c75ed1fd8..3e8815c347 100644
--- a/grep.h
+++ b/grep.h
@@ -191,6 +191,15 @@ void compile_grep_patterns(struct grep_opt *opt);
void free_grep_patterns(struct grep_opt *opt);
int grep_buffer(struct grep_opt *opt, const char *buf, unsigned long size);
+/* The field parameter is only used to filter header patterns
+ * (where appropriate). If filtering isn't desirable
+ * GREP_HEADER_FIELD_MAX should be supplied.
+ */
+int grep_next_match(struct grep_opt *opt,
+ const char *bol, const char *eol,
+ enum grep_context ctx, regmatch_t *pmatch,
+ enum grep_header_field field, int eflags);
+
struct grep_source {
char *name;