Chris Angelico writes: > On Sun, May 21, 2017 at 9:43 PM, Jussi Piitulainen wrote: >> It happened to me recently when cloning a git repository from GitHub, >> using GitHub Desktop, to a Mac OS file system. Some filenames differed >> only in case, like "INFO" and "info" in the same directory. Mac OS >> considered them the same file, Git tried to associate them with >> different objects, or something like that. Cat-astrophic :) >> >> Something similar happened on Windows with filenames that ended in a >> period, in the same repository after the problems on Mac OS had been >> fixed. Apparently Windows considers "log-3.1." the same as "log-3.1" - >> is that right? (This cloning attempt was not made by me but by a >> colleague who has access to a Windows computer. It was mostly calendar >> dates in a format that uses periods.) >> >> I was surprised that Git (or GitHub Desktop) simply failed so badly. >> Not sure what it could have done instead. > > Why are you surprised that it failed, if you agree that there's > nothing else it could have done? The fault is with the file system > that is unable to distinguish file names that are logically distinct. > It's not the file system's place to fold case; if anything, it's the > UI's job. And git has been given content for both file names, so > what's it going to do other than attempt to create both files?
I was surprised that it didn't notice and report that things went wrong while it was creating the clone that it was unable to handle afterwards. It apparently created an inconsistent index and thought everything was fine at that point. Then failed to understand its own state. It could have noticed that it's about to create a file that is already there when it shouldn't be. -- https://mail.python.org/mailman/listinfo/python-list