Re: git: cannot rename foo to Foo on a case-insensitive filesystem (e.g. on Windows)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, 28 Aug 2007, Reece Dunn wrote:
> 
> I have tried the following:
> 
>     git mv foo foo.tmp
>     git mv foo.tmp Foo

You could also have done

	git update-index --force-delete foo
	git add Foo

without actually ever *moving* the file, since "foo" and "Foo" are the 
same file on your broken filesystem.

> I haven't got any code yet, but from the analysis above, it would be a
> special case in the mv command when the files are the same and the
> case is different.

It would be really quite hard to decide that the two filenames are just 
the same file in different cases. It's a deeply filesystem-specific issue.

It may be "obvious" for "foo" vs "Foo", but what about all the interesting 
cases like German, where the "sharp s" (single letter: 'ß') capitalizes to 
SS (yes, two letters) because there simply *is* no upper-case sharp-s. 

Does the filesystem compare 'ß' and 'ss' as equal? You really cannot tell. 

So how do you know what to do in the case of

	git mv straße strasse

and both files "straße" and "strasse" exist and have the same content and 
inode? Are they the same filename? Or are they two filenames that are just 
hardlinked together?

This is just an example of why case-insensitive filesystems are TOTALLY 
INSANE!

			Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux