I observed the following behavior while working with the perl code base (on branch maint-5.004):
bash-3.2$ git status | grep modified # modified: configure bash-3.2$ git reset --hard HEAD is now at 9a4fb7e copy over bleads .gitignore bash-3.2$ git status | grep modified # modified: Configure bash-3.2$ git reset --hard HEAD is now at 9a4fb7e copy over bleads .gitignore bash-3.2$ git status | grep modified # modified: configure
This is happening because the two files share an inode (they are the same file), but they are different in the git index. My question is: how did that happen? If git is tracking 2 links to the same file, should git be expected to flag it as an error when only one of them is modified? Is this a git bug or user error?
Update:
It appears that the issue is not with git, but is related to case sensitivity of the filesystem (hfs+).
$ mkdir tmp $ cd tmp $ touch foo $ ls -i foo Foo 10301082 Foo 10301082 foo
I think perhaps that OS X needs to reconsidered as a useful platform for development, as this behavior is absurd.