]> git.ipfire.org Git - thirdparty/git.git/commit
fsmonitor--daemon: on macOS support symlink
authorsrz_zumix <zumix.cpp@gmail.com>
Tue, 8 Nov 2022 05:25:19 +0000 (05:25 +0000)
committerTaylor Blau <me@ttaylorr.com>
Tue, 8 Nov 2022 21:36:09 +0000 (16:36 -0500)
commitee0e7fc927c309e3ed1d46f7ba970b79d3a38514
tree05cf1c7105be66e81d40aaff0efb2abc0295ca7f
parent3b08839926fcc7cc48cf4c759737c1a71af430c1
fsmonitor--daemon: on macOS support symlink

Resolves a problem where symbolic links were not showing up in diff when
created or modified.

kFSEventStreamEventFlagItemIsSymlink is also treated as a file update.
This is because kFSEventStreamEventFlagItemIsFile is not included in
FSEvents when creating or deleting symbolic links. For example:

$ ln -snf t test
  fsevent: '/path/to/dir/test', flags=0x40100 ItemCreated|ItemIsSymlink|
$ ln -snf ci test
  fsevent: '/path/to/dir/test', flags=0x40200 ItemIsSymlink|ItemRemoved|
  fsevent: '/path/to/dir/test', flags=0x40100 ItemCreated|ItemIsSymlink|

Signed-off-by: srz_zumix <zumix.cpp@gmail.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
compat/fsmonitor/fsm-listen-darwin.c