Subject: Re: Git grep does not support multi-byte characters (like UTF-8)

From: Plamen Totev <[email-masked]>
Date: Tue, 7 Jul 2015 21:08:21 +0300 (EEST)

Junio C Hamano <[email-masked]> writes:

> Plamen Totev <[email-masked]> 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;

What should pickaxe search return - the first commit where the line is introduced
or the commit with the refactoring? From this point of view I think the -i switch makes sense.
The SQL is not the only case insensitive language - BASIC and Pascal come into my mind 
(those two I was using while I was in the high school :)).

Also I think it makes sense (maybe even more?) for natural languages.
For example after editing a text a sentence could be split into two.
Then the first word of the second sentence may change its case.
Of course the natural languages always  complicate the things a bit.
An ultimate tracking tools should be able to handle typo fixes, punctuation changes, etc.

But I'm getting a bit off-topic. What I wanted to say is that in some contexts it makes sense
(at least to me) to have case insensitive pickaxe search.
Or I'm missing something and there is a better tools to use is such cases?

Regards,
Plamen Totev