{"thread":{"id":"60485","subject":"issue unable to commit file and folder name to upper lower case","startedAt":"2023-11-07T11:28:30Z","lastAt":"2023-11-08T01:48:53Z","messageCount":3,"participants":["chengpu lee","Torsten Bögershausen","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"484527","messageId":"CAHv3AeCOoEXxpNh=gzjNcKbVyZFaYZ5BzSf3FGL1=pdheNebZw@mail.gmail.com","threadId":"60485","inReplyTo":null,"subject":"issue unable to commit file and folder name to upper lower case","fromName":"chengpu lee","fromEmail":"okuxxo@gmail.com","sentAt":"2023-11-07T11:28:14Z","receivedAt":"2023-11-07T11:28:30Z","isPatch":false,"sender":{"key":"okuxxo@gmail.com","avatar":null},"body":"Thank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n$ mkdir abc\n\n$ echo \"\">abc/.keep\n\n$ git status\nOn branch master\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n        abc/\n\n$ mv abc Abc\n\n$ git status\nOn branch master\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n        Abc/                                                      # rename\nto Abc/ successfully\n\n$ git commit -m \"commit Abc/\"                                     # commit\n\n$ mv Abc abc\n\n$ git status\nOn branch master\nnothing to commit, working tree clean                             # cannot\nrename again\n\n$ git diff\n>\"\"\n\n$ git add .\n\n$ git commit -m \"Cannot rename from Abc/ to abc/\"\nOn branch master\nnothing to commit, working tree clean                             # cannot\ncommit to right, keep old file name / folder name\n\n\nWhat did you expect to happen? (Expected behavior)\nIt should be correct to new name although just change upper/lower case,\nbecause other commiter can pull it from repo or improve reading clarity.\n\nWhat happened instead? (Actual behavior)\ncan commit file/folder but cannot fix upper/lower case.\n\nWhat's different between what you expected and what actually happened?\ngit unable to faithfully represent file/folder upper/lower case changes.\n\nAnything else you want to add:\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.40.0.windows.1\ncpu: x86_64\nbuilt from commit: 1d90ca2906dd4b7ddaf0669a13c173ec579d794a\nsizeof-long: 4\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nuname: Windows 10.0 19045\ncompiler info: gnuc: 12.2\nlibc info: no libc information available\n$SHELL (typically, interactive shell): C:\\Program Files\\Git\\usr\\bin\\bash.exe\n\n\n[Enabled Hooks]\n\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n$ mkdir abc\n\n$ echo \"\">abc/.keep\n\n$ git status\nOn branch master\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n        abc/\n\n$ mv abc Abc\n\n$ git status\nOn branch master\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n        Abc/                                                      # rename to Abc/ successfully\n\n$ git commit -m \"commit Abc/\"                                     # commit\n\n$ mv Abc abc\n\n$ git status\nOn branch master\nnothing to commit, working tree clean                             # cannot rename again\n\n$ git diff\n>\"\"\n\n$ git add .\n\n$ git commit -m \"Cannot rename from Abc/ to abc/\"\nOn branch master\nnothing to commit, working tree clean                             # cannot commit to right, keep old file name / folder name\n\n\nWhat did you expect to happen? (Expected behavior)\nIt should be correct to new name although just change upper/lower case, because other commiter can pull it from repo or improve reading clarity.\n\nWhat happened instead? (Actual behavior)\ncan commit file/folder but cannot fix upper/lower case.\n\nWhat's different between what you expected and what actually happened?\ngit unable to faithfully represent file/folder upper/lower case changes.\n\nAnything else you want to add:\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.40.0.windows.1\ncpu: x86_64\nbuilt from commit: 1d90ca2906dd4b7ddaf0669a13c173ec579d794a\nsizeof-long: 4\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nuname: Windows 10.0 19045 \ncompiler info: gnuc: 12.2\nlibc info: no libc information available\n$SHELL (typically, interactive shell): C:\\Program Files\\Git\\usr\\bin\\bash.exe\n\n\n[Enabled Hooks]\n"},{"id":"484533","messageId":"20231107173557.GA29083@tb-raspi4","threadId":"60485","inReplyTo":"CAHv3AeCOoEXxpNh=gzjNcKbVyZFaYZ5BzSf3FGL1=pdheNebZw@mail.gmail.com","subject":"Re: issue unable to commit file and folder name to upper lower case","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2023-11-07T17:35:57Z","receivedAt":"2023-11-07T17:36:01Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Tue, Nov 07, 2023 at 07:28:14PM +0800, chengpu lee wrote:\n> Thank you for filling out a Git bug report!\n> Please answer the following questions to help us understand your issue.\n>\n> What did you do before the bug happened? (Steps to reproduce your issue)\n> $ mkdir abc\n>\n> $ echo \"\">abc/.keep\n>\n> $ git status\n> On branch master\n> Untracked files:\n>   (use \"git add <file>...\" to include in what will be committed)\n>         abc/\n>\n> $ mv abc Abc\n>\n> $ git status\n> On branch master\n> Untracked files:\n>   (use \"git add <file>...\" to include in what will be committed)\n>         Abc/                                                      # rename\n> to Abc/ successfully\n>\n> $ git commit -m \"commit Abc/\"                                     # commit\n>\n> $ mv Abc abc\n>\n> $ git status\n> On branch master\n> nothing to commit, working tree clean                             # cannot\n> rename again\n>\n> $ git diff\n> >\"\"\n>\n> $ git add .\n>\n> $ git commit -m \"Cannot rename from Abc/ to abc/\"\n> On branch master\n> nothing to commit, working tree clean                             # cannot\n> commit to right, keep old file name / folder name\n>\n>\n> What did you expect to happen? (Expected behavior)\n> It should be correct to new name although just change upper/lower case,\n> because other commiter can pull it from repo or improve reading clarity.\n>\n> What happened instead? (Actual behavior)\n> can commit file/folder but cannot fix upper/lower case.\n>\n> What's different between what you expected and what actually happened?\n> git unable to faithfully represent file/folder upper/lower case changes.\n>\n\nYes, that is a restriction in Git, call it a bug, call it a missing feature.\nUnless someone fixes it, the recommendation is still to use a workaround:\n\ntb@pc:/tmp/ttt> git mv Abc tmp\ntb@pc:/tmp/ttt> git mv tmp abc\ntb@pc:/tmp/ttt> git status\nOn branch master\nChanges to be committed:\n  (use \"git restore --staged <file>...\" to unstage)\n        renamed:    Abc/.keep -> abc/.keep\n\ntb@pc:/tmp/ttt>\n"},{"id":"484552","messageId":"xmqqleb9816p.fsf@gitster.g","threadId":"60485","inReplyTo":"20231107173557.GA29083@tb-raspi4","subject":"Re: issue unable to commit file and folder name to upper lower case","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-11-08T01:48:46Z","receivedAt":"2023-11-08T01:48:53Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n> Yes, that is a restriction in Git, call it a bug, call it a missing feature.\n> Unless someone fixes it, the recommendation is still to use a workaround:\n>\n> tb@pc:/tmp/ttt> git mv Abc tmp\n> tb@pc:/tmp/ttt> git mv tmp abc\n> tb@pc:/tmp/ttt> git status\n> On branch master\n> Changes to be committed:\n>   (use \"git restore --staged <file>...\" to unstage)\n>         renamed:    Abc/.keep -> abc/.keep\n>\n> tb@pc:/tmp/ttt>\n\nCorrect and very helpful suggestion.  Or get a better filesystem ;-)\n\nThanks.\n\n"}]}