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

Re: Weird filename encoding issue

From
Alexander Gladysh <agladysh@gmail.com>
Date
Oct 18, 2008, 06:22 UTC
Message-ID
<c6c947f60810172322o12beeb80xfd39b551b0db7c99@mail.gmail.com>
In-Reply-To
<48F852FC.2070506@viscovery.net>
Thanks for answers, guys.
<...>
Show 14 quoted lines
> git asked OS X:
>
>   Does the file "\312\356\357\350\377.txt" exist?
>
> and OS X said: "Yes". Because otherwise, you would have seen the file
> listed as "deleted:" in the 'git status' call above.
>
> But then git also requested a file listing from OS X in order to list the
> untracked files. And now OS X returned the name "%CA%EE%EF%E8%FF.txt". How
> could you expect git to tell that this is the same file when OS X cannot
> decide how to name it?
>
> The solution: Do not use file names with some local (let alone Windows
> specific) encoding if you have to use the files on OS X, too.
Thank you, but this is not the solution, this is a workaround.
1. Git hooks do not work under msysgit. Thus I'm not able to prevent
people on Windows from committing weird filenames to the repo. (Please
don't start elitist discussion that people using git must do
everything conciously.)

Note also, that even if hooks would work, such files still may appear in the repo in theory (somebody may disable hooks after all).

2. Now I have one such file. I'm managing my repo on OS X, and have no
access to other machines right now. How can I create commit that
renames the file? Git GUI manages to create commit that adds the
renamed file, but does not delete old one.
Alexander.
Previous: Peter KreftingNext: Robin Rosenberg
Message 6 of 10 in “Weird filename encoding issue”
  1. Alexander GladyshOct 17, 2008
  2. Alexander GladyshOct 17, 2008
  3. Johannes SixtOct 17, 2008
  4. Robin RosenbergOct 18, 2008
  5. Peter KreftingOct 27, 2008
  6. Alexander GladyshOct 18, 2008
  7. Robin RosenbergOct 18, 2008
  8. Johannes SixtOct 18, 2008
  9. Alexander GladyshOct 19, 2008
  10. Jakub NarebskiOct 17, 2008

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.