From: "Torsten Bögershausen" <tboegi@web.de>
To: Alexander Rinass <alex@fournova.com>,
Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: "Torsten Bögershausen" <tboegi@web.de>, git@vger.kernel.org
Subject: Re: git diff does not precompose unicode file paths (OS X)
Date: Mon, 07 Mar 2016 09:54:45 +0100 [thread overview]
Message-ID: <56DD41D5.60100@web.de> (raw)
In-Reply-To: <8C785DB2-CEDB-435B-945B-00E4D98DBF99@fournova.com>
On 03/07/2016 08:47 AM, Alexander Rinass wrote:
>> On 04 Mar 2016, at 19:49, Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:
>>
>>
>>
>> On 04/03/16 14:37, Alexander Rinass wrote:
>>>> On 04 Mar 2016, at 13:16, Torsten Bögershausen <tboegi@web.de> wrote:
>>>>
>>>> On 03/04/2016 10:07 AM, Alexander Rinass wrote:
>> [snip]
>>
>>> Sticking a precompose_argv(argc, argv) into diff.c’s cmd_diff function fixes the issue.
>>>
>>> But I had to disable the check (precomposed_unicode != 1) in precompose_argv to make it work. That’s probably because precompose_argv is usually called from parse_options and is missing some other call before it?
>>>
>> Yes, you need to place it after the configuration is read, but before
>> calls to diff_no_index() or setup_revisions(). Directly after the call
>> to git_config() should be fine. [But this begs the question about other
>> commands, including plumbing, which don't call parse_options().]
>>
>> Maybe this will work for you (I can't test it, since I don't have any
>> access to a Mac):
>>
>> diff --git a/builtin/diff.c b/builtin/diff.c
>> index 343c6b8..b7a9405 100644
>> --- a/builtin/diff.c
>> +++ b/builtin/diff.c
>> @@ -320,6 +320,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
>> gitmodules_config();
>> init_diff_ui_defaults();
>> git_config(git_diff_ui_config, NULL);
>> + precompose_argv(argc, argv);
>>
>> init_revisions(&rev, prefix);
> Your patch fixes it for the diff command without further modifications.
>
> I have also modified diff-tree, diff-index and diff-files by adding the precompose_argv call and successfully verified it.
>
> I have attached the full patch. If there is anything else I can test, let me know.
Thanks for reporting, fixing, testing -
Do you think you can send an official patch to the list ?
If not, push your patches to some public repo ?
And if not, I can put it on my TODO-stack.
next prev parent reply other threads:[~2016-03-07 8:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 9:07 git diff does not precompose unicode file paths (OS X) Alexander Rinass
2016-03-04 12:16 ` Torsten Bögershausen
2016-03-04 14:37 ` Alexander Rinass
2016-03-04 18:36 ` Junio C Hamano
2016-03-04 18:49 ` Ramsay Jones
2016-03-07 7:47 ` Alexander Rinass
2016-03-07 8:54 ` Torsten Bögershausen [this message]
[not found] ` <5C6A30EF-ED0A-4D64-B971-CF873C64B46E@fournova.com>
2016-03-08 12:30 ` Torsten Bögershausen
2016-03-14 21:45 ` Alexander Rinass
2016-03-15 5:45 ` Torsten Bögershausen
2016-04-04 20:43 ` Alexander Rinass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56DD41D5.60100@web.de \
--to=tboegi@web.de \
--cc=alex@fournova.com \
--cc=git@vger.kernel.org \
--cc=ramsay@ramsayjones.plus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).