I am seeing a behaviour in Git which seems very mysterious to me. I keep a clone of the Linux repository from Github to play with Git locally. To be clear, I don\'t do much
The Linux source tree has filenames which differ in case only, which causes interesting failures on systems with case-insensitive filesystems.
You need a case-sensitive filesystem in order to work with the Linux source.
(include/linux/netfilter/xt_connmark.h
and include/linux/netfilter/xt_CONNMARK.h
are two different files in the Git repository, but only one can exist in your checkout at a time if your filesystem is case-insensitive.)
As @ephemient said, this is because case insensitive file system. And I guess you are using Mac's HFS?
For a simple solution on Mac, you can create a disk image, format the disk image with 'Case-sensitive Journaled HFS+':
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/git.dmg
Then mount the disk image by open ~/git.dmg
.
And then do all git clone
, git checkout
operations in the mountable volumes.
Or you need some third-party tool to convert HFS+ from case insensitive to case sensitive. As I know, some Mac Apps are made on case insensitive file systems, so some of them may failed to work if you do this convertion.
Try updating submodules. I've gotten some weird, somewhat similar issues when a submodule included in a repository has been updated. Doing git submodule update
may do the trick.