Thread (152 messages) flat view 152 messages, 23 authors, 2016-06-15

Re: git on MacOSX and files with decomposed utf-8 file names

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:44:06


On Wed, 16 Jan 2008, Jay Soffian wrote:
FWIW, here's Sun's take on the issue of filesystems and i18n:
Pretty sane, from a quick read-through, although most of it seems to not 
be about general issue, as about "let's emulate others correctly on their 
filesystems" (ie the rules are different for NTFS and HFS+, little enough 
discussion about "native" preferred logic).

However, while they don't consider normalization on file creates to be the 
"preferred solution", they *do* consider filename comparison with 
canonical equivalence to be that. Which means that you can get the same 
odd problems:

	fd = open(filename, O_CREAT);
	+
	readdir()

can actually return a *different* filename than the one we just created, 
if it already existed in the directory under the different normalization.

So it's basically "normalization-preserving, but normalization-ignoring" 
(the same way many filesystems are case-preserving, but case-ignoring). I 
don't much like it either, but as with case, the "preserving" behaviour is 
probably the nicer one.

I'd guess the problems are harder to trigger in practice, but you can 
still get some pretty hairy cases. It's just painful when readdir() and 
your own file creation doesn't have any obvious 1:1 relationship.

			Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help