grep/icase: avoid kwsset on literal non-ascii strings
When we detect the pattern is just a literal string, we avoid heavy regex engine and use fast substring search implemented in kwsset.c. But kws uses git-ctype which is locale-independent so it does not know how to fold case properly outside ascii range. Let regcomp or pcre take care of this case instead. Slower, but accurate. Noticed-by: NPlamen Totev <plamen.totev@abv.bg> Helped-by: NRené Scharfe <l.s.r@web.de> Helped-by: NEric Sunshine <sunshine@sunshineco.com> Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
Showing
t/t7812-grep-icase-non-ascii.sh
0 → 100755
想要评论请 注册 或 登录