Re: Git grep does not support multi-byte characters (like UTF-8)
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jul 8, 2015, 02:19 UTC
- Message-ID
- <CACsJy8De6Wt4J5ZFx5rEg2eRBt=7PsLim=31FvtLEKsX-6SMyQ@mail.gmail.com>
- In-Reply-To
- <663318203.435786.1436292501411.JavaMail.apache@nm32.abv.bg>
On Wed, Jul 8, 2015 at 1:08 AM, Plamen Totev <plamen.totev@abv.bg> wrote:
Show 29 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > >> Plamen Totev <plamen.totev@abv.bg> writes: >> >> > pickaxe search also uses kwsearch so the case insensitive search with >> > it does not work (e.g. git log -i -S). Maybe this is a less of a >> > problem here as one is expected to search for exact string (hence >> > knows the case) >> >> You reasoned correctly, I think. Pickaxe, as one of the building >> blocks to implement Linus's ultimate change tracking tool [*1*], >> should never pay attention to "-i". It is a step to finding the >> commit that touches the exact code block given (i.e. "how do you >> drill down?" part of $gmane/217 message). >> >> Thanks. >> >> [Footnote] >> *1* http://article.gmane.org/gmane.comp.version-control.git/217 > > Now that I read the link again and gave the matter a thought I'm not so sure. > In some contexts the case of the words does not matter. In SQL for example. > Let's consider a SQL script file that contains the following line: > > select name, address from customers; > > At some point we decide to change the coding style to: > > SELECT name, address FROM customers;
On top of this, pickaxe already supports icase even kws is used. But it only works for ascii, so either we fix it and support non-ascii, or we remove icase support entirely from diffcore_pickaxe(). I vote the former.
-- Duy