From: Junio C Hamano Date: Fri, 26 Jul 2019 20:36:43 GMT Subject: Re: [PATCH v2 7/8] grep: do not enter PCRE2_UTF mode on fixed matching Message-ID: In-Reply-To: <20190726150818.6373-8-avarab@gmail.com> Ævar Arnfjörð Bjarmason writes: > 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. Yes, exactly. That's quite a sane and minimum fix/workaround, I would think. > 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 > '