Subject: Re: [RFC] Support UTF-8 characters in Git alias names

From: Ben Knoble <[email-masked]>
Date: Mon, 9 Feb 2026 19:45:30 -0500

> 
> Le 9 févr. 2026 à 18:14, Junio C Hamano <[email-masked]> a écrit :
> 
> "brian m. carlson" <[email-masked]> writes:
> 
>>> On 2026-02-09 at 14:55:51, Junio C Hamano wrote:
>>> "brian m. carlson" <[email-masked]> writes:
>>> 
>>>> I don't think we have any Unicode normalization code at all in Git,
>>>> though, so if you want a quality implementation, that may be a thing we
>>>> need.
>>> 
>>> Isn't NKC/NKD a macOS-only issue in practice?  Anything on the
>>> command line "git" potty and "git-blah" built-in commands receive
>>> goes through precompose_argv_prefix() to be normalized on that
>>> platform.
>> 
>> Normalization is not a macOS-only issue.  Many accented characters can
>> be written in multiple ways,...
> 
> Yup, but that wasn't what I brought up macOS for.  No sane person
> would write the same string in multiple ways on purpose and
> everybody would want to stick to one, so that byte-for-byte
> comparison can decide paths they created in the filesystem can be
> matched with a list of paths they added in .gitignore, for example.
> And for that everybody uses normalization form C, no?
> 
> But the macOS makes it harder to stick to a single way when it
> involves filesystem entities; the pathname you gave to a new file
> with your creat/open(2) may be normalized in macOS specific way when
> it comes back from readdir(2).  Ahd for that glitch, we massage the
> strings we got from the command line and readdir(), which are in the
> normalization form D, into normalization form C.
> 
> I think the suggestion here is to assume that the users are doing
> the right thing and treat alias names (which eventually end up being
> pathname components) as bytes, and everything should be happy, even
> on macOS.

In what way do alias names end up being pathname components? Or did you mean to insert « treated like » (as in, normalized as command arguments)?