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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 08, 2021 at 08:56:08PM +0100, Daniel Troger wrote:
> > 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)

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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux