Re: "add -p" + filenames with UTF-8 multibyte characters = "No changes"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 16, 2009, 04:00 UTC
- Message-ID
- <7v63jbf2v0.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20090216033634.GA12461@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> 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.