Re: git on MacOSX and files with decomposed utf-8 file names
- From
Peter Karlsson <peter@softwolves.pp.se>
- Date
- Jan 18, 2008, 08:29 UTC
- Message-ID
- <Pine.LNX.4.64.0801180902470.817@ds9.cixit.se>
- In-Reply-To
- <alpine.LFD.1.00.0801161615330.2806@woody.linux-foundation.org>
Linus Torvalds:
> The difference I see between us is that when I tell you that this is > exactly the same thing as your file *contents*,
This is the same issue as the CRLF issue I posted on earlier, and it all stems from that git also sees file names as a stream of bytes, not a string of characters, just as it does text.
> An OS that silently changes the contents of your files is *crap*. > Get it?
A program that silently ignores the conventions of the platform it runs on is *crap*, no matter if the conventions are not the same as for other platforms.
> An OS that silently changes the contents of your directories is *crap*. > Get it now?
A program that silently ignores the conventions of the file system it tries to store its files on is *crap* :-)
In my perfect world, file names would be stored as a string of characters, so if I save a file with an å in it, that å would be preserved no matter if I run Linux on ext2 with my locale is set to latin-1 (which stores it as byte 0xE5), on Windows with NTFS (which stores it as the UTF-16 code 0x00E5), on Windows/DOS with FAT (which stores it as the byte 0x86) or on Mac OS X which stores it as decomposed UTF-8 (whose byte sequence I don't know at the top of my head). If that was just stored as U+00E5 in whatever encoding in the filename index, the local implementation of git can just check it out in the form needed.
-- \\// Peter - http://www.softwolves.pp.se/