Re: [PATCH v2 00/27] Builtin FSMonitor Part 3
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Mar 13, 2022, 10:42 UTC
- Message-ID
- <20220313104230.ctwbskywcq5jxv36@tb-raspi4>
- In-Reply-To
- <pull.1143.v2.git.1646777727.gitgitgadget@gmail.com>
Hej Jeff,
I tried your patch on both a newer Mac and an older machine (with HFS+) The older machine doesn't have kFSEventStreamEventFlagItemCloned As it is an enum, and not a #define, I ended up here:
diff --git a/compat/fsmonitor/fsm-listen-darwin.c b/compat/fsmonitor/fsm-listen-darwin.c
index 3332d3b779..fa172a05c4 100644
--- a/compat/fsmonitor/fsm-listen-darwin.c
+++ b/compat/fsmonitor/fsm-listen-darwin.c
@@ -169,8 +169,6 @@ static void log_flags_set(const char *path, const FSEventStreamEventFlags flag)
strbuf_addstr(&msg, "ItemXattrMod|");
if (flag & kFSEventStreamEventFlagOwnEvent)
strbuf_addstr(&msg, "OwnEvent|");
- if (flag & kFSEventStreamEventFlagItemCloned)
- strbuf_addstr(&msg, "ItemCloned|"); trace_printf_key(&trace_fsmonitor, "fsevent: '%s', flags=0x%x %s",
path, flag, msg.buf);
@@ -221,8 +219,7 @@ static int ef_ignore_xattr(const FSEventStreamEventFlags ef)
kFSEventStreamEventFlagItemModified |
kFSEventStreamEventFlagItemRemoved |
kFSEventStreamEventFlagItemRenamed |
- kFSEventStreamEventFlagItemXattrMod |
- kFSEventStreamEventFlagItemCloned;
+ kFSEventStreamEventFlagItemXattrMod ;One other thing, I just add it here: There is a new file, t/lib-unicode-nfc-nfd.sh, which helps us with this code: test_lazy_prereq UNICODE_NFC_PRESERVED
The existing code uses a construct called UTF8_NFD_TO_NFC
And now I have 2 questions: - Do we need the UNICODE_NFC_PRESERVED at all ? - And should the UTF8_NFD_TO_NFC better be called UTF8_NFC_TO_NFD, because that is what it checks. - Do we need the UNICODE_NFD_PRESERVED at all ?
As there are no non-UNICODE_NFD_PRESERVED filesystems, as far as I know. And the current code does no tests, just debug prints. I dunno.
On Tue, Mar 08, 2022 at 10:15:00PM +0000, Jeff Hostetler via GitGitGadget wrote:
> Here is V2 of part 3 of my builtin FSMonitor series.
Show 8 quoted lines
> [] I updated the daemon on MacOS to report both the NFC and NFD spellings of > a pathname when appropriate. This is a little more general than the > "core.precomposeUnicode" setting, since the daemon does not know how the > client has (or will have) it set when they make a query. > > [] I replaced my Unicode NFC/NFD test for MacOS to focus exclusively on > Unicode composition/decomposition sensitivity and to not confuse that with > case sensitivity.
That is a good thing.
[snip]