{"thread":{"id":"46603","subject":"Bug with ignorecase on Git and Cygwin","startedAt":"2017-08-16T12:06:01Z","lastAt":"2017-08-16T12:55:18Z","messageCount":2,"participants":["CHEVALLIER Yves","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"326496","messageId":"078108E7D0BA58498F61BC8C1ED2D10933E86F@srvne111.csem.local","threadId":"46603","inReplyTo":null,"subject":"Bug with ignorecase on Git and Cygwin","fromName":"CHEVALLIER Yves","fromEmail":"yves.chevallier@csem.ch","sentAt":"2017-08-16T11:50:47Z","receivedAt":"2017-08-16T12:06:01Z","isPatch":false,"sender":{"key":"yves.chevallier@csem.ch","avatar":null},"body":"Hi, \n\nOn Cygwin, the config value `ignorecase` is set to `true` during `git init` and it is not possible to change the default value using templates. \n\nThe issue was discovered while I was tracking a bunch of source files of a SDK. To track the changes I simply rm all the working directory, unzip the new SDK, then git add . and git commit -am \"new sdk\". In this process an issue with an assembly file with preprocessing was incorrectly named .s instead of .S. In the next version the correction was made, but Git was unable to detect it. \n\nThat said I've tried to manually change ignorecase from true to false and I still have the issue. Git on Cygwin cannot detect files renamed with a case change. \n\nIs it a bug?\n\n# It works on Ubuntu\n\n\t$ git --version\n\tgit version 1.8.3.1\n    $ # To be sure \n    $ git config --global init.templateDir /usr/share/git-core/templates\n\t$ cat /usr/share/git-core/templates\n\t# Patched config \n\t[core] \n\t    dummyvar = true \n\t\tignorecase = false\n\t\t\n\t$ git init dummy \n\t$ cat dummy/.git/config\n\t# Patched config\n\t[core]\n\t\tignorecase = false\n\t\tdummyvar = true\n\t\trepositoryformatversion = 0\n\t\tfilemode = true\n\t\tbare = false\n\t\tlogallrefupdates = true\n\n# It doesn't work on Cygwin:\n\n\t$ git --version\n\tgit version 2.13.2\n\t$ which git\n\t/usr/bin/git\n    $ # To be sure \n    $ git config --global init.templateDir /usr/share/git-core/templates\n\t$ cat /usr/share/git-core/templates\n\t# Patched config \n\t[core] \n\t    dummyvar = true \n\t\tignorecase = false\t\t\n\t$ git init dummy \n\t$ cat dummy/.git/config\n\t# Patched config\n\t[core]\n\t\tignorecase = true\n\t\tdummyvar = false\n\t\trepositoryformatversion = 0\n\t\tfilemode = true\n\t\tbare = false\n\t\tlogallrefupdates = true\n"},{"id":"326505","messageId":"20170816125510.GA26384@tor.lan","threadId":"46603","inReplyTo":"078108E7D0BA58498F61BC8C1ED2D10933E86F@srvne111.csem.local","subject":"Re: Bug with ignorecase on Git and Cygwin","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-08-16T12:55:10Z","receivedAt":"2017-08-16T12:55:18Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Wed, Aug 16, 2017 at 11:50:47AM +0000, CHEVALLIER Yves wrote:\n> Hi, \n> \n> On Cygwin, the config value `ignorecase` is set to `true` during `git init` and it is not possible to change the default value using templates. \n> \n> The issue was discovered while I was tracking a bunch of source files of a SDK. To track the changes I simply rm all the working directory, unzip the new SDK, then git add . and git commit -am \"new sdk\". In this process an issue with an assembly file with preprocessing was incorrectly named .s instead of .S. In the next version the correction was made, but Git was unable to detect it. \n> \n> That said I've tried to manually change ignorecase from true to false and I still have the issue. Git on Cygwin cannot detect files renamed with a case change. \n> \n> Is it a bug?\n> \n\nThe thing is that the underlying file system (under cygwin, Windows in general, or MacOs)  treats a.s the same as a.S\nSo Git can not do better than the file system.\nWhat you can do:\n\ngit mv a.S a.s\ngit commit\n\n(This can be done by a script)\n\n> # It works on Ubuntu\n[]\n"}]}