diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2016-06-25 07:22:30 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-27 07:31:35 -0700 |
commit | 5c1ebcca4d1df3b2a84d01b3f32ec13bf8f760f8 (patch) | |
tree | b3ae3c96fcc407dad3de84c7c4d29ca2447bc426 /submodule.c | |
parent | d8acfe1eaf8621025c4095d3fbb88b2703b3fa54 (diff) | |
download | git-5c1ebcca4d1df3b2a84d01b3f32ec13bf8f760f8.tar.gz git-5c1ebcca4d1df3b2a84d01b3f32ec13bf8f760f8.tar.xz |
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: Plamen Totev <plamen.totev@abv.bg>
Helped-by: René Scharfe <l.s.r@web.de>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.c')
0 files changed, 0 insertions, 0 deletions