Subject: Re: "add -p" + filenames with UTF-8 multibyte characters = "No changes"

From: Junio C Hamano <[email-masked]>
Date: Sun, 15 Feb 2009 20:00:03 -0800

Jeff King <[email-masked]> writes:

> But what is the right encoding to specify? We can guess that it is
> whatever the commit message is in (defaulting to utf-8). It is by no
> means correct, but it would probably work pretty well in practice.
>
> On the other hand, we already have the same problem for encoded file
> _contents_. So maybe it is not a big problem in practice.

I did not spell the specifics out because this change won't happen in any
near future anyway, but my thinking was to give a way for "add -p" to
either (1) internally run without quotepath regardless of the user's
settings or (2) unquote the paths correctly when it learns the set of
paths affected by the change.

I think the right approach is (2), because you need to unquote pathnames
with some byte values that even with core.quotepath=false will not pass
unquoted *anyway*.

I also happen to think that it may be a good idea to ignore core.quotepath
settings in format-patch, but that is a separate topic.