From: "Jun. T" <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: Bug report; git tab-completion on macOS within paths containing unicode characters
Date: Tue, 30 Apr 2024 11:31:53 +0900 [thread overview]
Message-ID: <172BB257-968F-4CF5-AE3C-F93704ED2049@kba.biglobe.ne.jp> (raw)
In-Reply-To: <CAH+w=7Z-jRzpXGnKY8JFKFjwcnDyFg02drCn316JZb4W0OL6qg@mail.gmail.com>
> 2024/04/30 10:57、Bart Schaefer <schaefer@brasslantern.com>のメール:
>
> On Mon, Apr 29, 2024 at 5:41 PM Jun. T <takimoto-j@kba.biglobe.ne.jp> wrote:
>>
>>> 2024/04/30 2:54、Bart Schaefer <schaefer@brasslantern.com>のメール:
>>>
>>> On Mon, Apr 29, 2024 at 10:38 AM Jun. T <takimoto-j@kba.biglobe.ne.jp> wrote:
>>>>
>>>> In __git_files (called from __git_other_files), 'git ls-files'
>>>> is called two times.
>>>
>>> Comments in the function indicate this is intentional:
>>
>> Yes, but the second call is just for "better than nothing",
>> so the first call should better succeed, I think.
>
> I don't think the first call ever succeeds on files that are not
> already known to git,
'git ls-fils --others' gives untracked files.
>> I tried
>> git ls-files $'/path/to/\xc3\xbc/test2'
>> and
>> git ls-files $'/path/to/u\xcc\x88/test2'
>> but both didn't work. Isn't this a bug of git?
>
> Neither of those worked for me either, even without NFD characters in
> the file name, until I was cd'd inside the repository.
If there are NFD characters, they do not work even inside the repo.
But I think at least one of them should work.
% cd /path/to/ü
% git ls-files $'/path/to/u\xcc\x88' # NFD
fatal: /path/to/ü: '/path/to/ü' is outside repository at '/path/to/ü'
(in the error message, the 1st and 2nd ü is NFC, the 3rd is NFD)
I run git within a debugger (lldb), and noticed that, on macOS,
git internally converted the pathspec on the command line (for example
$'/path/to/u\xcc\x88/test2') into NFC. But it treats the top level
working directory name in NFD, so the pathspec (NFC) is considered
as outside of the working tree (NFD).
I will send a bug report to git@vger.kernel.org.
prev parent reply other threads:[~2024-04-30 2:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 7:17 Yves Delley
2024-04-27 19:14 ` Bart Schaefer
2024-04-27 19:31 ` Bart Schaefer
2024-04-28 7:22 ` Yves Delley
2024-04-28 15:28 ` Bart Schaefer
2024-04-28 18:59 ` Bart Schaefer
2024-04-28 19:01 ` Bart Schaefer
2024-04-29 17:37 ` Jun. T
2024-04-29 17:54 ` Bart Schaefer
2024-04-30 0:41 ` Jun. T
2024-04-30 1:57 ` Bart Schaefer
2024-04-30 2:31 ` Jun. T [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=172BB257-968F-4CF5-AE3C-F93704ED2049@kba.biglobe.ne.jp \
--to=takimoto-j@kba.biglobe.ne.jp \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).