{"thread":{"id":"39249","subject":"Case rename not detected","startedAt":"2015-05-05T05:52:08Z","lastAt":"2015-05-06T20:00:43Z","messageCount":4,"participants":["Orgad Shaneh","Junio C Hamano","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"260583","messageId":"CAGHpTBJuRCrg5jL7Anm9kxGJEf5cUmPzDToZG0UXeT_xNMWfsg@mail.gmail.com","threadId":"39249","inReplyTo":null,"subject":"Case rename not detected","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2015-05-05T05:52:08Z","receivedAt":"2015-05-05T05:52:08Z","isPatch":false,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"Hi,\n\nFile case rename is not detected correctly on case-insensitive\nfilesystems. git mv does support it though.\n\nExample:\n\ngit init\necho hello > foo\ngit add foo\ngit commit -m initial\nmv foo Foo\ngit status # No changes\ngit add . -A # Doesn't add anything\n\n- Orgad\n"},{"id":"260584","messageId":"xmqqzj5jeeek.fsf@gitster.dls.corp.google.com","threadId":"39249","inReplyTo":"CAGHpTBJuRCrg5jL7Anm9kxGJEf5cUmPzDToZG0UXeT_xNMWfsg@mail.gmail.com","subject":"Re: Case rename not detected","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-05T06:17:55Z","receivedAt":"2015-05-05T06:17:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Orgad Shaneh <orgads@gmail.com> writes:\n\n> File case rename is not detected correctly on case-insensitive\n> filesystems. git mv does support it though.\n\nIt is a very much deliberate design decision to keep the case\nrecorded in the index on case insensitive filesystems, where people\ncan screw up the case of files they obtained from the project\nwithout even meaning to do so, as these filesystems and tools on\nthem can carelessly change cases---after all, the case doesn't\nmatter to these tools, but the people who interact with your work\nresult via Git do---so we trust what Git initially gave you\n(e.g. via \"checkout\") more than the filesystem.\n\nTo effect the same as \"git mv\" at the end-user level, you would need\nto remove the entry from the index and re-add it.  I.e.\n\n> git init\n> echo hello > foo\n> git add foo\n> git commit -m initial\n> mv foo Foo\n> git status # No changes\n\ngit rm --cached foo ;# Foo should also work here, I think\ngit add Foo ;# you should not say 'foo' here\n\n> git add . -A # Doesn't add anything\n>\n> - Orgad\n"},{"id":"260585","messageId":"CAGHpTBLMDaKUFVwbeqhKitYLL6Ufp7EkPRc5mjq7yN2gE=RmUg@mail.gmail.com","threadId":"39249","inReplyTo":"xmqqzj5jeeek.fsf@gitster.dls.corp.google.com","subject":"Re: Case rename not detected","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2015-05-05T06:27:22Z","receivedAt":"2015-05-05T06:27:22Z","isPatch":false,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"Thanks for the fast response!\n\nOn Tue, May 5, 2015 at 9:17 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Orgad Shaneh <orgads@gmail.com> writes:\n>\n>> File case rename is not detected correctly on case-insensitive\n>> filesystems. git mv does support it though.\n>\n> It is a very much deliberate design decision to keep the case\n> recorded in the index on case insensitive filesystems, where people\n> can screw up the case of files they obtained from the project\n> without even meaning to do so, as these filesystems and tools on\n> them can carelessly change cases---after all, the case doesn't\n> matter to these tools, but the people who interact with your work\n> result via Git do---so we trust what Git initially gave you\n> (e.g. via \"checkout\") more than the filesystem.\n\nCan you name tools that change file case without notifying the user?\nI'm not aware of any.\n\n>\n> To effect the same as \"git mv\" at the end-user level, you would need\n> to remove the entry from the index and re-add it.  I.e.\n>\n>> git init\n>> echo hello > foo\n>> git add foo\n>> git commit -m initial\n>> mv foo Foo\n>> git status # No changes\n>\n> git rm --cached foo ;# Foo should also work here, I think\n> git add Foo ;# you should not say 'foo' here\n\nThis is very involved, and the user must be aware of the rename while\ncommitting. I usually trust git to find differences on its own,\nwithout needing my help.\n\nWe ran into this problem with a real project, which is mostly\ndeveloped on Windows machines, but built on linux, where case matters.\n\nOne file was committed as Foo.cpp on the filesystem but as foo.cpp in\nthe Makefile. Then in a subsequent commit it was supposed to be\nrenamed foo.cpp, but it wasn't due to this bug.\n\n- Orgad\n"},{"id":"260687","messageId":"554A72EB.9000605@web.de","threadId":"39249","inReplyTo":"CAGHpTBLMDaKUFVwbeqhKitYLL6Ufp7EkPRc5mjq7yN2gE=RmUg@mail.gmail.com","subject":"Re: Case rename not detected","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2015-05-06T20:00:43Z","receivedAt":"2015-05-06T20:00:43Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2015-05-05 08.27, Orgad Shaneh wrote:\n> Thanks for the fast response!\n> \n> On Tue, May 5, 2015 at 9:17 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Orgad Shaneh <orgads@gmail.com> writes:\n>>\n>>> File case rename is not detected correctly on case-insensitive\n>>> filesystems. git mv does support it though.\n>>\n>> It is a very much deliberate design decision to keep the case\n>> recorded in the index on case insensitive filesystems, where people\n>> can screw up the case of files they obtained from the project\n>> without even meaning to do so, as these filesystems and tools on\n>> them can carelessly change cases---after all, the case doesn't\n>> matter to these tools, but the people who interact with your work\n>> result via Git do---so we trust what Git initially gave you\n>> (e.g. via \"checkout\") more than the filesystem.\n> \n> Can you name tools that change file case without notifying the user?\n> I'm not aware of any.\n> \n>>\n>> To effect the same as \"git mv\" at the end-user level, you would need\n>> to remove the entry from the index and re-add it.  I.e.\n>>\n>>> git init\n>>> echo hello > foo\n>>> git add foo\n>>> git commit -m initial\n>>> mv foo Foo\n>>> git status # No changes\nYou can use \ngit -c core.ignorecase=false status\n\nIt will report Foo as untracked\n\nfoo is not reported as missing, because the underlying OS\nsays \"foo\" is there when Git does a stat(\"Foo\")\n"}]}