summaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-02-25 23:47:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-02-25 23:47:38 (GMT)
commit5c4f3804a73933504e76b6ebdd946a2db3b1d214 (patch)
tree6274991c8e7adfdaa4762fe975e324f35e699e6a /grep.c
parent80f7f618b612cb7415e34d139aab0808cc8679d6 (diff)
parent97169fc361fd3ab2eedbfedd6c13806433be4036 (diff)
downloadgit-5c4f3804a73933504e76b6ebdd946a2db3b1d214.zip
git-5c4f3804a73933504e76b6ebdd946a2db3b1d214.tar.gz
git-5c4f3804a73933504e76b6ebdd946a2db3b1d214.tar.bz2
Merge branch 'rs/pcre-invalid-utf8-fix-fix'
Workaround we have for versions of PCRE2 before their version 10.36 were in effect only for their versions newer than 10.36 by mistake, which has been corrected. * rs/pcre-invalid-utf8-fix-fix: grep: fix triggering PCRE2_NO_START_OPTIMIZE workaround
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 d5ad961..82eb7da 100644
--- a/grep.c
+++ b/grep.c
@@ -295,7 +295,7 @@ static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt
if (!opt->ignore_locale && is_utf8_locale() && !literal)
options |= (PCRE2_UTF | PCRE2_MATCH_INVALID_UTF);
-#ifdef GIT_PCRE2_VERSION_10_36_OR_HIGHER
+#ifndef GIT_PCRE2_VERSION_10_36_OR_HIGHER
/* Work around https://bugs.exim.org/show_bug.cgi?id=2642 fixed in 10.36 */
if (PCRE2_MATCH_INVALID_UTF && options & (PCRE2_UTF | PCRE2_CASELESS))
options |= PCRE2_NO_START_OPTIMIZE;