Re: [PATCH v4 1/1] macOS: ls-files path fails if path of workdir is NFD
- From
- Jun T <takimoto-j@kba.biglobe.ne.jp>
- Date
- Jun 4, 2024, 00:56 UTC
- Message-ID
- <BD63F8A7-986B-424B-B67C-B78887E8CA00@kba.biglobe.ne.jp>
- In-Reply-To
- <20240531193156.28046-1-tboegi@web.de>
Show 5 quoted lines
> 2024/06/01 4:3, tboegi@web.de <mailto:tboegi@web.de> wrote: > > The solution is to add a call to precompose_string_if_needed() > to this code in setup.c : > `work_tree = precompose_string_if_needed(get_git_work_tree());`
This simple patch works for both 'ls-files NFD' and 'ls-files NFC'.
> > There is, however, a limitation with this very usage of Git: > The (repo) local .gitconfig file is not used,
core.precomposeunicode in .git/config is read, in function precompose_argv_prefix(), and NFD in argv is converted to NFC.
But, as you know, the variable the_repository->worktree or the return value of get_git_work_tree() is in NFD.
> 2024/06/03 4:40, Torsten Bögershausen <tboegi@web.de> wrote: > > The root cause may be fixed in a different commit later.
Of course fixing the 'root cause' is better, but I don't know whether it's easy or not.
Anyway, thank you for woking on this problem.
-- Jun