git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-bugreport-2021-01-06-1209.txt (git can't deal with special characters)

From
Torsten Bögershausen <tboegi@web.de>
Date
Jan 9, 2021, 17:23 UTC
Message-ID
<20210109172301.qkxxeeqnyrr6nyc5@tb-raspi4>
In-Reply-To
<7B64BC13-CB54-43CE-8C01-D45E25591E2A@icloud.com>
On Fri, Jan 08, 2021 at 08:56:08PM +0100, Daniel Troger wrote:
Show 5 quoted lines
> > That did the trick, the test case is now reproducible here.
>
> > It seems as if there could be a patch in a couple of days, but no promises.
>
> That's great news, thank you all very much!

Hej Daniel, Not sure if I can keep my promise, please see below.

> I 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.

I haven't heard about anything special about Mac OS High Sierra. If there are strange things, please let us know.

(And I still womder, how did you mange to create the "decomposed version of å" ?
 Mac OS itself doesn't decompose the "å", in opposite to "ä" or "ö".
 It creates a name for a file in decomposed form for "ä", "ö" and a lot of other
 characters/code points, but not for "å".
 It does, however, treat the pre- and de-composed form of "å" equivilent)
Show 13 quoted lines
>
> In 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.
>
> And this is the message I get when cloning:
> warning: the following paths have collided (e.g. case-sensitive paths
> on a case-insensitive filesystem) and only one from the same
> colliding group is in the working tree:
>   '[...]/paulbrunngård-springyard/main.ts'
>   '[...]/paulbrunngård-springyard/main.ts'
>
> What will happen with the two folders in the git repo after the patch?
>
Now, that is another question.

First of all, I would recommend to "remove" one of the folders from Git, because all files are tracked twice in Git, but "shadowed" by the file system.

To clean up the repo, you can do like this, explained in a dummy repo:

#One file (that is all we have) is tracked twice: user@mac:/tmp/AAA> git ls-files "paulbrunnga\314\212rd-springyard/horse" "paulbrunng\303\245rd-springyard/horse"

# Remove all files from Git, but keep them on disk: user@mac:/tmp/AAA> git rm -rf --cached . rm 'paulbrunngård-springyard/horse' rm 'paulbrunngård-springyard/horse'

# Re-add one version, the precomposed:
user@mac:/tmp/AAA> git add .
user@mac:/tmp/AAA> git status
On branch master
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
          deleted:    "paulbrunnga\314\212rd-springyard/horse"

user@mac:/tmp/AAA> git ls-files "paulbrunng\303\245rd-springyard/horse"

#Not shown: git commit -m "Remove duplicate directory"

####################

Now back to a potential patch: That will take some time. I digged some hours into the stuff, add lots of debug traces, patches and stuff, and now we need a cleanup and get it into a better shape to be acceptable.

All the best
Previous: Daniel TrogerNext: Daniel Troger
Message 2 of 4 in “Re: git-bugreport-2021-01-06-1209.txt (git can't deal with special characters)”
  1. Daniel TrogerJan 8, 2021
  2. Torsten BögershausenJan 9, 2021
  3. Daniel TrogerJan 13, 2021
  4. Torsten BögershausenJan 16, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.