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

Re: Moving a directory into another fails

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 4, 2006, 20:56 UTC
Message-ID
<200612042156.44963.jnareb@gmail.com>
In-Reply-To
<Pine.LNX.4.64.0612041114240.3476@woody.osdl.org>
Dnia poniedziałek 4. grudnia 2006 21:26, Linus Torvalds napisał:
 
Show 6 quoted lines
>>>> On Mon, 4 Dec 2006, Jakub Narebski wrote:
>>>> 
>>>>> [...] git should acquire core.filesystemEncoding configuration variable 
>>>>> which would encode from filesystem encoding used in working directory 
>>>>> and perhaps index to UTF-8 encoding used in repository (in tree objects) 
>>>>> and perhaps index.
Show 9 quoted lines
> You guys are ignoring the _real_ problem. 
> 
> It has nothing at all to do with dependencies on external packages. The 
> REAL problem is that if you do locale-dependent trees and other git 
> objects, git will STOP WORKING.
> 
> A filename in a tree object _has_ to be see as a pure 8-bit character 
> stream. They _have_ to be compared with "memcmp()", and they have to sort 
> the same way and mean EXACTLY the same thing for everybody.
What I propose is having filename in tree object UTF-8 encoded. I don't
know if git relies heavily that filename encoding on filesystem (in working
area) is the same as in the index, is the same as in a tree object.
 
Although I'm not sure what is the problem. You checkout non US-ASCII filename
out of git; the file can have strange characters in a name, but should
encode to the filename as is in git. The problem migh be some forbidden by
filesystem characters in a filename perhaps. 

Although Wolfgang Fischer wrote (to me and Johannes Schindelin) that HFS+ uses UTF8-NFC (Normalization-Form-Composed) when creating a file, while readdir returns encoding used by HFS+, which is UTF8-NFD (Normalization-Form- Decomposed). [Explitive censored]

> If a filesystem cannot represent that name AS THAT BYTE SEQUENCE then the 
> filesystem is broken. No ifs, buts, maybes about it. I'm sorry, but that's 
> how it is.

We have some configuration variables to work around broken filesystems, like core.ignoreStat, so why not core.filesystemEncoding.

-- 
Jakub Narebski
Previous: Shawn PearceNext: Johannes Schindelin
Message 15 of 24 in “Moving a directory into another fails”
  1. Jon SmirlJul 26, 2006
  2. Nicolas VilzJul 26, 2006
  3. Jon SmirlJul 26, 2006
  4. Nicolas VilzJul 26, 2006
  5. Petr BaudisJul 28, 2006
  6. Stefan PfetzingDec 4, 2006
  7. Jakub NarebskiDec 4, 2006
  8. Johannes SchindelinDec 4, 2006
  9. Jakub NarebskiDec 4, 2006
  10. Johannes SchindelinDec 4, 2006
  11. Jakub NarebskiDec 4, 2006
  12. Linus TorvaldsDec 4, 2006
  13. Linus TorvaldsDec 4, 2006
  14. Shawn PearceDec 4, 2006
  15. Jakub NarebskiDec 4, 2006
  16. Johannes SchindelinDec 4, 2006
  17. Linus TorvaldsDec 4, 2006
  18. Johannes SchindelinDec 5, 2006
  19. Jakub NarebskiDec 5, 2006
  20. filesystem encodings and gitweb tests, was Re: Moving a directory into another failsJohannes Schindelin, Dec 5, 2006
  21. Jakub NarebskiDec 5, 2006
  22. Johannes SchindelinDec 5, 2006
  23. Linus TorvaldsDec 5, 2006
  24. Johannes SchindelinDec 4, 2006

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.