Open Gpinchon opened 4 years ago
Hi @Gpinchon,
Thank you for reporting this issue.
My gut instinct is that case sensitivity has been enabled for Windows, but core.ignorecase is set to true.
To help identify the problem, could you share the following:
Whether you have core.ignorecase
enabled in your repository. This can be checked by running the following git command:
git config --get core.ignorecase
Your debug information. This can be found by opening the repository in Sublime Merge, and selecting Help > Debug Information
. Before sharing this, take a moment to remove any information you feel is sensitive (file paths, directories etc).
Thanks, - Dylan
Hi @dpjohnst, Your assumption is correct, core.ignorecase is set to true, but setting it to false doesn't fix the issue. Also, in debug log, it says that "Our config output is different to the Git config output" I am scanning for personnal informations before attaching the log. [EDIT] : Here, I think I got everything : Debug Informations
Hi @Gpinchon,
Thanks for sharing the debug information!
We've just released Sublime Merge development build 2030. Before continuing further, could you update to this build and verify if this resolves the issue.
Additionally, could you confirm whether you can stage the file via the command line using plain Git.
Thanks, - Dylan
Hello @dpjohnst, I just installed the new dev build, it does not fix the issue, now I can see both "src/parser/FBX.cpp" and "src/Parser/FBX.cpp" and whenever I try to stage the changes for "src/Parser/FBX.cpp" it stages "src/parser/FBX.cpp" instead... Small precision, the files located under "src/Parser" were located under "src/parser" before, but I changed the folder's case, but that was a long time ago. Same issue via Git Bash, seems like my history got "fooped up" by Sublime Merge...
I made the repository public BTW, if that can help, it seems to be happening on a clean clone : https://github.com/Gpinchon/TabGraph.git
Hi @Gpinchon,
Thank you for sharing this additional information!
I've cloned the repository, and managed to identify the issue.
Git relies on core.ignorecase being set appropriately, and in this case it looks like core.ignorecase
is set to true
in the repository config file. This causes Git to be unable to stage the file (as it cannot tell the difference between src/Parser/FBX.cpp
and src/parser/FBX.cpp
, and tries to stage the latter instead).
To resolve this issue, I was able to modify the config file in the repository (found under TabGraph\.git\config
).
In this file, I set ignorecase = false
and the problem resolved itself.
Once you've set ignorecase
to false, run the following command in the repository (via command line) to ensure it's been set correctly: git config core.ignorecase
.
Once run, it should output false
.
Once this has been set, you should be able to stage the file with Git (and also Sublime Merge).
As a bit of info, Sublime Merge never performs Git operations itself, and instead relies on Git to perform the operation. Often if you see any strange behavior with write operations (such as staging or unstaging), its likely a git configuration issue.
Let me know if this helps, and if not I can definitely investigate further. Thanks, - Dylan
Testing further, I've noticed some strange behavior, likely resulting from the case-insensitivity on Windows.
I'd take a read of the following if you get a chance: https://www.hanselman.com/blog/GitIsCasesensitiveAndYourFilesystemMayNotBeWeirdFolderMergingOnWindows.aspx https://docs.microsoft.com/en-us/azure/devops/repos/git/case-sensitivity?view=azure-devops https://stackoverflow.com/questions/2528589/git-windows-case-sensitive-file-names-not-handled-properly
The recommended solution by most is to rename the files / folders in a case insensitive fashion if you're doing any Windows development.
Hope this helps!
Version info
Description
I clicked on Stage while commiting previous changes and now Sublime Merge sees two files and I can't commit the file
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
Sublime Merge won't let you stage your changes on this file anymore (git bash won't work either), it can sometimes see the file two times with different cases
Screenshots
When I try to stage src/Parser/OBJ.cpp (not src/parser/OBJ.cpp which does not exist)
After commiting (I can't stage src/Parcer/OBJ.cpp)
[EDIT] I could kind of fix this by deleting the file, commiting the change and adding it again, but now Sublime Merge has apparently decided that it's located under src/parser and not src/Parser