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
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2019-07-26 18:08:17 +0300
committerJunio C Hamano <gitster@pobox.com>2019-07-26 23:56:40 +0300
commit870eea81669bfff4333b37b11fedd870cd05fd90 (patch)
treea0e89650008caa4fba2890dabdc7a087953f6159 /t/t7812-grep-icase-non-ascii.sh
parent8a5999838e3cc24652f09670b6fe9461a789721b (diff)
grep: do not enter PCRE2_UTF mode on fixed matching
As discussed in the last commit partially fix a bug introduced in b65abcafc7 ("grep: use PCRE v2 for optimized fixed-string search", 2019-07-01). Because PCRE v2, unlike kwset, validates its UTF-8 input we'd die on e.g.: fatal: pcre2_match failed with error code -22: UTF-8 error: isolated byte with 0x80 bit set When grepping a non-ASCII fixed string. This is a more general problem that's hard to fix, but we can at least fix the most common case of grepping for a fixed string without "-i". I can't think of a reason for why we'd turn on PCRE2_UTF when matching byte-for-byte like that. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7812-grep-icase-non-ascii.sh')
-rwxr-xr-xt/t7812-grep-icase-non-ascii.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t7812-grep-icase-non-ascii.sh b/t/t7812-grep-icase-non-ascii.sh
index 96c3572056..531eb59d57 100755
--- a/t/t7812-grep-icase-non-ascii.sh
+++ b/t/t7812-grep-icase-non-ascii.sh
@@ -68,9 +68,9 @@ test_expect_success GETTEXT_LOCALE,LIBPCRE2 'PCRE v2: grep ASCII from invalid UT
'
test_expect_success GETTEXT_LOCALE,LIBPCRE2 'PCRE v2: grep non-ASCII from invalid UTF-8 data' '
- test_might_fail git grep -h "æ" invalid-0x80 >actual &&
+ git grep -h "æ" invalid-0x80 >actual &&
test_cmp expected actual &&
- test_must_fail git grep -h "(*NO_JIT)æ" invalid-0x80 &&
+ git grep -h "(*NO_JIT)æ" invalid-0x80 &&
test_cmp expected actual
'