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

Re: Bug report

From
Carlos Martín Nieto <cmn@elego.de>
Date
Oct 5, 2012, 10:47 UTC
Message-ID
<87boghdwkx.fsf@centaur.cmartin.tk>
In-Reply-To
<20121005143231.788094d675c9974f4777318d@domain007.com>
Konstantin Khomoutov <flatworm@users.sourceforge.net> writes:
Show 29 quoted lines
> On Fri, 5 Oct 2012 14:13:49 +0400
> Муковников Михаил <m.mukovnikov@gmail.com> wrote:
>
>> There's a problem using git with files having cyrillic 'й' in their
>> name, git just can't track them.
>> 
>> uname: Darwin 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25
>> 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64 git
>> version: 1.7.12.1 (from macports)
>> 
>> Steps to reproduce:
>> - git init
>> - touch test_й
>> - git status (should be "untracked files present")
>> - git add test_й
>> - git status
>> 
>> # Untracked files:
>> #   (use "git add <file>..." to include in what will be committed)
>> #
>> #	"test_\320\270\314\206"
>> nothing added to commit but untracked files present (use "git add" to
>> track)
>> 
>> Could this be helped somehow?--
>
> What "this"?  If you mean displaying escapes for UTF-8 bytes
> representing that letter "й", then try setting core.quotepath to false
> for this repository and see if that helps.
Notice the 'git add test_й'. The problem is that git reports it as untracked.

Михаил, is this the whole output or do you also see a differently-escaped version of the filename under tracked files? Does this problem not show up if you use 'git add -A' or 'git add .' instead of typing the name? If so, this happens because HFS+ stores and reports names differently than the way we told it to store it, so git sees a different set of bytes than what it's expecting and considers it a different file.

With a recent version of git, you can set the core.precomposeunicode config setting to true, which deals with this situation. This tells git to transform the data it gets from the filesystem to the format that everyone else uses, which helps not only this, but also the 'git add .' case, so git stores the filename in the format the same way that other OSs expect to find.

   cmn
Previous: Konstantin KhomoutovNext: Муковников Михаил
Message 3 of 5 in “Bug report”
  1. Муковников МихаилOct 5, 2012
  2. Konstantin KhomoutovOct 5, 2012
  3. Carlos Martín NietoOct 5, 2012
  4. Муковников МихаилOct 5, 2012
  5. Муковников МихаилOct 5, 2012

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.