git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Jeff KingNext: Junio C Hamano
Message 5 of 8 in “"add -p" + filenames with UTF-8 multibyte characters = "No changes"”
  1. Antonio García DomínguezFeb 15, 2009
  2. Teemu LikonenFeb 15, 2009
  3. Teemu LikonenFeb 15, 2009
  4. Jeff KingFeb 16, 2009
  5. Junio C HamanoFeb 16, 2009
  6. git-add -i/-p: learn to unwrap C-quoted pathsJunio C Hamano, Feb 17, 2009
  7. Teemu LikonenFeb 17, 2009
  8. Teemu LikonenFeb 16, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.