aboutsummaryrefslogtreecommitdiffstats
path: root/grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-10-06 12:25:17 +0900
committerJunio C Hamano <gitster@pobox.com>2019-10-06 12:25:17 +0900
commitf00b57e5bc56042e21384e3af0e77e6855b213df (patch)
tree4634c7e0c521eac8f01d0b02d9d68c7c6e63d64f /grep.c
parentb0f8aed48fd473b3bcf07de31dfdb97443ce766e (diff)
parentad7c543e3b0f80befd26f4115f8fec4285a018bf (diff)
downloadgit-f00b57e5bc56042e21384e3af0e77e6855b213df.tar.gz
Merge branch 'cb/skip-utf8-check-with-pcre1'
Make sure the grep machinery does not abort when seeing a payload that is not UTF-8 even when JIT is not in use with PCRE1. * cb/skip-utf8-check-with-pcre1: grep: skip UTF8 checks explicitly
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/grep.c b/grep.c
index cd952ef5d3..9dd290809e 100644
--- a/grep.c
+++ b/grep.c
@@ -421,7 +421,7 @@ static void compile_pcre1_regexp(struct grep_pat *p, const struct grep_opt *opt)
static int pcre1match(struct grep_pat *p, const char *line, const char *eol,
regmatch_t *match, int eflags)
{
- int ovector[30], ret, flags = 0;
+ int ovector[30], ret, flags = PCRE_NO_UTF8_CHECK;
if (eflags & REG_NOTBOL)
flags |= PCRE_NOTBOL;