4 ms·
My ears perked up when I heard that it involved renames on OSX. I don't know about the exact issue he had, but I recently found out the hard way that OSX's HFS+
by silentbicycle 15y ago
My ears perked up when I heard that it involved renames on OSX. I don't know about the exact issue he had, but I recently found out the hard way that OSX's HFS+ is a case-insensitive* filesystem. You can get subtle issues by importing multiple files with the same case (such as "README.txt" and "ReadMe.txt") into the same repository; this isn't specific to git.
I had a similar issue with Perforce on Windows - Perforce was case sensitive, Windows wasn't, and thanks to CamelCase, there were two files that had the same letters but different casing. (I don't remember the names.)
* Technically, "case-insensitive but case-preserving", which in practice seems to mean, "case-sensitive, except when you need it to be".
- illumen 15y agoyeah, or it can be sensitive. It's got various options that you can tweak depending on needs.
- silentbicycle 15y agoI didn't know that. (Some info here: http://hints.macworld.com/article.php?story=20031027224603111 http://hints.macworld.com/article.php?story=2003102722460311...) I still think it's a terrible default, though. I'm coming to OSX from BSD and using it as a Unix. Retrofitting case-insensitivity onto a Unix is bound to lead to ugly corner cases.
- masklinn 15y ago> Retrofitting case-insensitivity onto a Unix is bound to lead to ugly corner cases. It generally works well, but the other way around does not work: many OSX software (most prominently — as usual — adobe's) play fast and lose with casing, and will break down on case-sensitive HFS+.
- gthank 15y agoI'm pretty sure it hoses Norton's "security" software, too. Of course, if you can't handle documented file system options, I don't trust you to detect exploits….
- __david__ 15y agoYeah, you don't even want to know what I had to do to get around Steam not handling case sensitive filesystems. Steam is the only thing I've noticed that doesn't work right. There was also one driver that installed itself into "/LIBRARY/EXTENSIONS/". That was annoying but easy to fix.
- glhaynes 15y agoThe vast majority of their users aren't using it "as a Unix" and most of those who are don't mind case-insensitivity or know to use case-sensitivity when it's needed.
- varikin 15y agoI have been bitten by that a couple times now. I develop on a mac, but deploy on Linux and had a couple cases of trying to import or open a file that couldn't be found due to a case issue. And it is next to impossible to rename the file on a Mac from SomeFile.txt to somefile.txt. I think I had to do SomeFile.txt -> someotherfile.txt, commit -> somefile.txt, commit.
- nknight 15y agoUnix's case sensitivity has long been a source of minor but obvious annoyance to non-technical users, to whom a name is a name -- the case of the letters is irrelevant. On top of which, it would have been an added complication for developers porting from Classic, and an unexpected change for users, in exchange for no substantive benefit. In truth, the only time HFS+'s case-insensitivity has bitten me was extracting an SDK from Broadcom, and even then, the SDK wasn't about to run on OS X anyway (it's entirely Linux-based), I was just pulling out some documentation.
- politician 15y ago> annoyance to non-technical users Indeed, I've had to make password systems case-insensitive for similar reasons.
- ben1040 15y agoOn the other hand I recently wiped and rebult my laptop with Lion and case sensitive HFS+, only to find that Adobe Creative Suite explicitly refuses to install on case sensitive volumes. Incredibly annpying.
- lobster_johnson 15y agoIt also breaks Steam. I'm sure it breaks a lot of other (badly-written, I should add) apps. I definitely recommend against using case-sensitive HFS+. It's a pain to fix because you have to reformat, and you can't restore from a Time Machine backup because Time Machine requires that the source and target file systems are case-compatible. :-/
- sunchild 15y agoI work in git on OS X all the time. When you rename a file (regardless of your OS), it's just plain good practice to git add . and (at least) git status to ensure you've got the file you want committed.
- mortil 15y agoAside from having to import data from case-sensitive environments, could you give an example of a case where you would actually /want/ you filesystem to be case-sensitive? When would it ever, be a good idea to have two distinct files called readme.txt and README.txt?
- silentbicycle 15y agoI really wish I could remember the specific example. We used camelCase for filenames on that project, and there were two distinct names (like "bookcase" and "bookCase") that did not sound alike, yet were the same letters. The sort of thing that meant something very different if you moved the space. I prefer case-sensitive filesystems because the separation between works is semantically meaningful in English.
- masak 15y agoExample: checking out a repository where someone named (say) a file 'foo' and a directory 'Foo'. It happens. Most of the time that checkout will simply fail. Having this not work is less than enjoyable.
- bennoleslie 15y agoYeah, HFS+ is a nasty beast. In this case not the culprit, firstly because the first thing I do when getting a new MacBook is reformatting as case-sensitive, and secondly, because it was just a directory rename (e.g: ./foo/ to ./bar/). Yeha, I wouldn't blame a tool for not dealing with the brain-dead almost case-sensitive HFS+ filesystem.