Subject: Re: [PATCH] diff: run arguments through precompose_argv

From: Torsten Bögershausen <[email-masked]>
Date: Wed, 6 Apr 2016 09:47:32 +0200

On 06.04.16 08:51, Alexander Rinass wrote:
> 
>> On 05 Apr 2016, at 21:15, Johannes Sixt <[email-masked]> wrote:
>>
>> Am 05.04.2016 um 19:09 schrieb Junio C Hamano:
>>>> Thanks-to: Torsten Bögershausen <[email-masked]>
>>
>> I sense NFD disease: The combining diaresis should combine with the o, not the g. Here is a correct line to copy-and-paste if you like:
>>
>> Thanks-to: Torsten Bögershausen <[email-masked]>
>>
>> -- Hannes
> 
> Thanks for reviewing and catching the NFD encoding error.
> 
> I will send in a patch v2 with the correct NFC encoding.
> 
> Would you also like me to alter the commit message as mentioned by Junio?
> 
> I could rewrite the sentence:
> 
> “As a result, no diff is displayed when feeding such a file path to the
> diff command.”
> 
> into simply saying:
> 
> “As a result, no diff is displayed.”
> 
> However, I don't read the original message as it would imply that only
> file paths are affected by the precompose_argv call. 
> 
> Are there other suggestions on improving the commit message?
May be something like this, (but this is highly a personal taste question)

When running diff commands, file paths containing decomposed unicode code points
are not converted to precomposed unicode form under Mac OS X.

As a result, no diff is displayed.

Opposite to most builtin commands, the diff builtin is missing the
parse_options call, which internally runs arguments through the
precompose_argv call, which ensures all arguments are in precomposed
unicode form.

Fix the problem by adding a precompose_argv call to diff, diff-index, diff-files and diff-tree.

Signed-off-by: Alexander Rinass <[email-masked]>
Helped-By: Torsten Bögershausen <[email-masked]>
Helped-By: Junio C Hamano <[email-masked]>