{"thread":{"id":"23569","subject":"Problems with file name case on Windows.","startedAt":"2010-04-22T20:54:17Z","lastAt":"2010-04-23T12:16:06Z","messageCount":4,"participants":["martinvz","Tay Ray Chuan","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"140160","messageId":"1271969657620-4947131.post@n2.nabble.com","threadId":"23569","inReplyTo":null,"subject":"Problems with file name case on Windows.","fromName":"martinvz","fromEmail":"martin.von.zweigbergk@gmail.com","sentAt":"2010-04-22T20:54:17Z","receivedAt":"2010-04-22T20:54:17Z","isPatch":false,"sender":{"key":"martinvonz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/891642?v=4"},"body":"\nUnder Cygwin, if you add a file \"a\" in one commit, then rename the file to\n\"A\" and commit again, both files will be in the new commit. Running the\nfollowing line under Cygwin produces a commit with both files (\"a\" and \"A\").\nRunning it on Linux produces a commit with one file (\"A\"), as expected.\n\ngit init; git config core.ignorecase false; touch a; git add a; git commit\n-m a; mv a A; git add -A; git commit -m A\n\nThe problem seems to be with the \"git add -A\" part, since it is possible to\nget around the problem by running \"git add A\" followed by \"git rm a\" (or by\nusing lower-level commands, I suppose). What are the chances of getting this\nfixed? It's mostly annoying when importing existing code where it's harder\nto use the add-rm workaround, since you don't know which files have changed\nfile name case.\n-- \nView this message in context: http://git.661346.n2.nabble.com/Problems-with-file-name-case-on-Windows-tp4947131p4947131.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"140182","messageId":"g2lbe6fef0d1004222048m5527be2fw8283d080c82733e8@mail.gmail.com","threadId":"23569","inReplyTo":"1271969657620-4947131.post@n2.nabble.com","subject":"Re: Problems with file name case on Windows.","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-04-23T03:48:16Z","receivedAt":"2010-04-23T03:48:16Z","isPatch":false,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Hi,\n\nOn Fri, Apr 23, 2010 at 4:54 AM, martinvz\n<martin.von.zweigbergk@gmail.com> wrote:\n> git init; git config core.ignorecase false; touch a; git add a; git commit\n> -m a; mv a A; git add -A; git commit -m A\n\nHave you tried\n\n  git mv a A; git commit -m A\n\ninstead of\n\n  mv a A; git add -A; git commit -m A\n\n?\n\n-- \nCheers,\nRay Chuan\n"},{"id":"140189","messageId":"4BD14066.3040307@kdbg.org","threadId":"23569","inReplyTo":"1271969657620-4947131.post@n2.nabble.com","subject":"Re: Problems with file name case on Windows.","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2010-04-23T06:38:30Z","receivedAt":"2010-04-23T06:38:30Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 22.04.2010 22:54, schrieb martinvz:\n>\n> Under Cygwin, if you add a file \"a\" in one commit, then rename the file to\n> \"A\" and commit again, both files will be in the new commit. Running the\n> following line under Cygwin produces a commit with both files (\"a\" and \"A\").\n> Running it on Linux produces a commit with one file (\"A\"), as expected.\n\nThe safe way to achieve your goal is:\n\n   git mv a b\n   git mv b A\n   git commit\n\n-- Hannes\n"},{"id":"140210","messageId":"1272024966257-4950180.post@n2.nabble.com","threadId":"23569","inReplyTo":"4BD14066.3040307@kdbg.org","subject":"Re: Problems with file name case on Windows.","fromName":"martinvz","fromEmail":"martin.von.zweigbergk@gmail.com","sentAt":"2010-04-23T12:16:06Z","receivedAt":"2010-04-23T12:16:06Z","isPatch":false,"sender":{"key":"martinvonz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/891642?v=4"},"body":"\nThanks, I had forgotten about \"git mv\". Still, when you receive just a\ntarball of code (actually from another VCS in my case), you would have to\nfigure out which files had been renamed, before you could run the command,\nso it is not very useful in scripting in this case. Maybe what I\ncould/should do is something like \"git rm -rf *; <untar> ; git add -A\"?\n\n/Martin\n-- \nView this message in context: http://git.661346.n2.nabble.com/Problems-with-file-name-case-on-Windows-tp4947131p4950180.html\nSent from the git mailing list archive at Nabble.com.\n"}]}