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 16, 2021, 17:24 UTC
Message-ID
<20210116172447.uroh2m5r3uvlbmih@tb-raspi4>
In-Reply-To
<653FE799-B0D6-471A-8801-834C6CA409E3@icloud.com>
On Wed, Jan 13, 2021 at 03:57:03PM +0100, Daniel Troger wrote:
Show 13 quoted lines
> Hej Torsten,
>
> > To clean up the repo, you can do like this, explained in a dummy repo:
>
> your commands to remove one of the versions worked perfectly, thanks!
>
> > And I still womder, how did you mange to create the "decomposed version of å" ?
>
> 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.
>
> > I digged some hours into the stuff, add lots of debug traces, patches and stuff
>
> 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.

That is a more tricky thing than I thought. When Git starts, it runs getcwd() to find out where you started. Inside that whole path there is the Git repo to be found, and the whole path split into to parts: The part pointing out the repo and the part inside the repo.

This is done in setup.c, and it seems as if we need to precompose the whole path, to work correctly.

However, the configuration saying "core.precomposeunicode" has not been read yet.
And setup.c doesn't know, where to find it, that is my understanding.

When I patch the getcwd() function to try to read the configuration, it doesn't find it (yet).

It can find the global (or system) config. Technically speaking, that can be used, but will probably cause other problems, since sometimes the (repo) local configuration is different, sometimes not.

As far as I understand today, the best thing we can do is to check, if getcwd() may need a precomposition: precompose and see if the result is different.

Then error out, telling the user that you can not run Git inside this directory.

I don't know, if this is worth the effort.
But: If somebody comes up with a patch, I am happy to review it
and/or get it into shape.
Previous: Daniel Troger
Message 4 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.