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

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

From
ADAntonio García Domínguez <nyoescape@gmail.com>
Date
Feb 15, 2009, 18:40 UTC
Message-ID
<2b8265360902151040t49711942udd4862cc9df01da5@mail.gmail.com>
Hello all,

I seem to have run into a bug in "add -p" and "add -i" when trying to stage diff hunks in tracked files with UTF-8 multibyte characters (such as "á"). If I add "á", commit, then modify it and try to run "add -p" on it, Git reports "No changes". "add -i" doesn't do anything, either.

I've switched to 1.6.2.rc0.90.g0753 and the problem persists. If it helps, I've attached a small shell script with a minimal recipe for triggering the bug.

This should incorrectly report "No changes": ./test-accents.sh

And this should work fine: FILE=a ./test-accents.sh

-Antonio
Next: Teemu Likonen
Message 1 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.