mirror of
https://github.com/git/git
synced 2024-08-28 12:09:19 +00:00
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>
This commit is contained in:
parent
3b08839926
commit
ee0e7fc927
|
@ -336,7 +336,7 @@ static void fsevent_callback(ConstFSEventStreamRef streamRef,
|
|||
* know how much to invalidate/refresh.
|
||||
*/
|
||||
|
||||
if (event_flags[k] & kFSEventStreamEventFlagItemIsFile) {
|
||||
if (event_flags[k] & (kFSEventStreamEventFlagItemIsFile | kFSEventStreamEventFlagItemIsSymlink)) {
|
||||
const char *rel = path_k +
|
||||
state->path_worktree_watch.len + 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue