{"thread":{"id":"54965","subject":"Re: git-bugreport-2021-01-06-1209.txt (git can't deal with special characters)","startedAt":"2021-01-08T19:57:10Z","lastAt":"2021-01-16T17:35:06Z","messageCount":4,"participants":["Daniel Troger","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"413871","messageId":"7B64BC13-CB54-43CE-8C01-D45E25591E2A@icloud.com","threadId":"54965","inReplyTo":null,"subject":"Re: git-bugreport-2021-01-06-1209.txt (git can't deal with special characters)","fromName":"Daniel Troger","fromEmail":"random_n0body@icloud.com","sentAt":"2021-01-08T19:56:08Z","receivedAt":"2021-01-08T19:57:10Z","isPatch":false,"sender":{"key":"random_n0body@icloud.com","avatar":null},"body":"> That did the trick, the test case is now reproducible here.\n\n> It seems as if there could be a patch in a couple of days, but no promises.\n\nThat's great news, thank you all very much!\n\nI was already afraid at first it was some weird macOS filesystem bug only happening on high sierra and earlier which was never going to be fixed.\n\nIn the meantime I have managed to add \"both directories\" to git (with git add paulbr*). It's funny, now one directory shows up twice when viewing my repo on gitlab.\n\nAnd this is the message I get when cloning:\nwarning: the following paths have collided (e.g. case-sensitive paths\non a case-insensitive filesystem) and only one from the same\ncolliding group is in the working tree:\n  '[...]/paulbrunngård-springyard/main.ts'\n  '[...]/paulbrunngård-springyard/main.ts'\n\nWhat will happen with the two folders in the git repo after the patch?\n\n"},{"id":"413918","messageId":"20210109172301.qkxxeeqnyrr6nyc5@tb-raspi4","threadId":"54965","inReplyTo":"7B64BC13-CB54-43CE-8C01-D45E25591E2A@icloud.com","subject":"Re: git-bugreport-2021-01-06-1209.txt (git can't deal with special characters)","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2021-01-09T17:23:01Z","receivedAt":"2021-01-09T17:25:08Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Fri, Jan 08, 2021 at 08:56:08PM +0100, Daniel Troger wrote:\n> > That did the trick, the test case is now reproducible here.\n>\n> > It seems as if there could be a patch in a couple of days, but no promises.\n>\n> That's great news, thank you all very much!\n\nHej Daniel,\nNot sure if I can keep my promise, please see below.\n\n> I was already afraid at first it was some weird macOS filesystem bug only happening on high sierra\n> and earlier which was never going to be fixed.\n\nI haven't heard about anything special about Mac OS High Sierra.\nIf there are strange things, please let us know.\n\n(And I still womder, how did you mange to create the \"decomposed version of å\" ?\n Mac OS itself doesn't decompose the \"å\", in opposite to \"ä\" or \"ö\".\n It creates a name for a file in decomposed form for \"ä\", \"ö\" and a lot of other\n characters/code points, but not for \"å\".\n It does, however, treat the pre- and de-composed form of \"å\" equivilent)\n\n>\n> In the meantime I have managed to add \"both directories\" to git (with git add paulbr*).\n> It's funny, now one directory shows up twice when viewing my repo on gitlab.\n>\n> And this is the message I get when cloning:\n> warning: the following paths have collided (e.g. case-sensitive paths\n> on a case-insensitive filesystem) and only one from the same\n> colliding group is in the working tree:\n>   '[...]/paulbrunngård-springyard/main.ts'\n>   '[...]/paulbrunngård-springyard/main.ts'\n>\n> What will happen with the two folders in the git repo after the patch?\n>\n\nNow, that is another question.\n\nFirst of all, I would recommend to \"remove\" one of the folders from Git,\nbecause all files are tracked twice in Git, but \"shadowed\" by the file system.\n\n\n\nTo clean up the repo, you can do like this, explained in a dummy repo:\n\n#One file (that is all we have) is tracked twice:\nuser@mac:/tmp/AAA> git ls-files\n\"paulbrunnga\\314\\212rd-springyard/horse\"\n\"paulbrunng\\303\\245rd-springyard/horse\"\n\n# Remove all files from Git, but keep them on disk:\nuser@mac:/tmp/AAA> git rm -rf --cached .\nrm 'paulbrunngård-springyard/horse'\nrm 'paulbrunngård-springyard/horse'\n\n# Re-add one version, the precomposed:\nuser@mac:/tmp/AAA> git add .\nuser@mac:/tmp/AAA> git status\nOn branch master\nChanges to be committed:\n  (use \"git restore --staged <file>...\" to unstage)\n          deleted:    \"paulbrunnga\\314\\212rd-springyard/horse\"\n\nuser@mac:/tmp/AAA> git ls-files\n\"paulbrunng\\303\\245rd-springyard/horse\"\n\n#Not shown:\ngit commit -m \"Remove duplicate directory\"\n\n####################\n\nNow back to a potential patch:\nThat will take some time.\nI digged some hours into the stuff, add lots of debug traces,\npatches and stuff, and now we need a cleanup and get it into a better\nshape to be acceptable.\n\nAll the best\n"},{"id":"414266","messageId":"653FE799-B0D6-471A-8801-834C6CA409E3@icloud.com","threadId":"54965","inReplyTo":"20210109172301.qkxxeeqnyrr6nyc5@tb-raspi4","subject":"Re: git-bugreport-2021-01-06-1209.txt (git can't deal with special characters)","fromName":"Daniel Troger","fromEmail":"random_n0body@icloud.com","sentAt":"2021-01-13T14:57:03Z","receivedAt":"2021-01-13T14:58:13Z","isPatch":false,"sender":{"key":"random_n0body@icloud.com","avatar":null},"body":"Hej Torsten, \n\n> To clean up the repo, you can do like this, explained in a dummy repo: \n\nyour commands to remove one of the versions worked perfectly, thanks!\n\n> And I still womder, how did you mange to create the \"decomposed version of å\" ?\n\nI created the directory with finder or atom I suppose, I did not find an mkdir command for that directory in my 290MB of bash history.\n\n> I digged some hours into the stuff, add lots of debug traces, patches and stuff\n\nIf I understand correctly, you already came up with a patch? That's great news! It's fine if it takes time as long as it gets fixed eventually.\n\nBest regards"},{"id":"414512","messageId":"20210116172447.uroh2m5r3uvlbmih@tb-raspi4","threadId":"54965","inReplyTo":"653FE799-B0D6-471A-8801-834C6CA409E3@icloud.com","subject":"Re: git-bugreport-2021-01-06-1209.txt (git can't deal with special characters)","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2021-01-16T17:24:48Z","receivedAt":"2021-01-16T17:35:06Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Wed, Jan 13, 2021 at 03:57:03PM +0100, Daniel Troger wrote:\n> Hej Torsten,\n>\n> > To clean up the repo, you can do like this, explained in a dummy repo:\n>\n> your commands to remove one of the versions worked perfectly, thanks!\n>\n> > And I still womder, how did you mange to create the \"decomposed version of å\" ?\n>\n> I created the directory with finder or atom I suppose, I did not find an mkdir command for that directory in my 290MB of bash history.\n>\n> > I digged some hours into the stuff, add lots of debug traces, patches and stuff\n>\n> If I understand correctly, you already came up with a patch? That's great news! It's fine if it takes time as long as it gets fixed eventually.\n\nThat is a more tricky thing than I thought.\nWhen Git starts, it runs getcwd() to find out where you started.\nInside that whole path there is the Git repo to be found, and the whole\npath split into to parts:\nThe part pointing out the repo and\nthe part inside the repo.\n\nThis is done in setup.c, and it seems as if we need to precompose the whole\npath, to work correctly.\n\nHowever, the configuration saying \"core.precomposeunicode\" has not been read yet.\n\nAnd setup.c doesn't know, where to find it, that is my understanding.\n\nWhen I patch the getcwd() function to try to read the configuration,\nit doesn't find it (yet).\n\nIt can find the global (or system) config.\nTechnically speaking, that can be used, but will probably cause other problems,\nsince sometimes the (repo) local configuration is different, sometimes not.\n\nAs far as I understand today, the best thing we can do is to check,\nif getcwd() may need a precomposition: precompose and see if\nthe result is different.\n\nThen error out, telling the user that you can not run Git inside\nthis directory.\n\nI don't know, if this is worth the effort.\n\nBut: If somebody comes up with a patch, I am happy to review it\nand/or get it into shape.\n"}]}