fsmonitor: on macOS also emit NFC spelling for NFD pathname
commitd6d58ff8abd382226980f00360e12e4bf91456e4
authorJeff Hostetler <jeffhost@microsoft.com>
Thu, 26 May 2022 21:47:19 +0000 (26 21:47 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2022 22:59:27 +0000 (26 15:59 -0700)
treec7c742704421fbd52cdf7982a9a81e45683269cd
parentcaa9c37ec0b1c30ac1df266d01da6edb2c49d8ad
fsmonitor: on macOS also emit NFC spelling for NFD pathname

Emit NFC or NFC and NFD spellings of pathnames on macOS.

MacOS is Unicode composition insensitive, so NFC and NFD spellings are
treated as aliases and collide.  While the spelling of pathnames in
filesystem events depends upon the underlying filesystem, such as
APFS, HFS+ or FAT32, the OS enforces such collisions regardless of
filesystem.

Teach the daemon to always report the NFC spelling and to report
the NFD spelling when stored in that format on the disk.

This is slightly more general than "core.precomposeUnicode".

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/fsmonitor/fsm-listen-darwin.c