]> git.ipfire.org Git - thirdparty/git.git/commit - grep.c
grep: fix triggering PCRE2_NO_START_OPTIMIZE workaround
authorRené Scharfe <l.s.r@web.de>
Thu, 17 Feb 2022 21:14:29 +0000 (22:14 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Feb 2022 22:56:56 +0000 (14:56 -0800)
commit97169fc361fd3ab2eedbfedd6c13806433be4036
treee71b93126728ba7c4795b25c8d6c708a136b4279
parentc1760352e0b27cfbdffd97dec50a9eb552318993
grep: fix triggering PCRE2_NO_START_OPTIMIZE workaround

PCRE2 bug 2642 was fixed in version 10.36.  Our 95ca1f987e (grep/pcre2:
better support invalid UTF-8 haystacks, 2021-01-24) worked around it on
older versions by setting the flag PCRE2_NO_START_OPTIMIZE.  797c359978
(grep/pcre2: use compile-time PCREv2 version test, 2021-02-18) switched
it around to set the flag on 10.36 and higher instead, while it claimed
to use "the same test done at compile-time".

Switch the condition back to apply the workaround on PCRE2 versions
_before_ 10.36.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c