Subject: Re: [RFC/PATCH 4/4] grep: obey --textconv for the case rev:path

From: Michael J Gruber <[email-masked]>
Date: Fri, 08 Feb 2013 12:27:44 +0100

Junio C Hamano venit, vidit, dixit 07.02.2013 19:03:
> Michael J Gruber <[email-masked]> writes:
> 
>>>> (cd t && git grep GET_SHA1_QUIETLY HEAD:../cache.h)
>>>> ../HEAD:../cache.h:#define GET_SHA1_QUIETLY        01
>>>
>>> Yuck.
>>
>> And even more yuck:
>>
>> (cd t && git grep --full-name GET_SHA1_QUIETLY HEAD:../cache.h)
>> HEAD:../cache.h:#define GET_SHA1_QUIETLY        01
>>
>> Someone does not expect a "rev:" to be in there, it seems ;)
> 
> I think stepping outside of $(cwd) is an afterthought the code does
> not anticipate.
> 

Well, we do resolve relative paths correctly, and there are even some
"chdir" in the code path. It's just that the output label is incorrect.

Michael