Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion GitUpKit/Core/GCLiveRepository.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,16 @@ - (void)_stream:(ConstFSEventStreamRef)stream didReceiveEvents:(size_t)numEvents
for (size_t i = 0; i < numEvents; ++i) {
const char* path = ((const char**)eventPaths)[i];
if (eventFlags[i] & kFSEventStreamEventFlagMustScanSubDirs) {
XLOG_WARNING(@"Ignoring event stream request to rescan \"%s\"", path); // Note that this directory path can be missing the trailing slash
// Apple docs: "Your application must rescan not just the directory given in the event,
// but all its children, recursively." This flag fires when the kernel event queue overflows
// (e.g. during rapid multi-file changes like git checkout). We must not ignore it.
XLOG_WARNING(@"Received event stream request to rescan \"%s\"", path);
if (stream == _gitDirectoryStream) {
_gitDirectoryChanged = YES;
} else {
_workingDirectoryChanged = YES;
}
CFRunLoopTimerSetNextFireDate(_updateTimer, CFAbsoluteTimeGetCurrent() + kUpdateLatency);

} else { // Documentation says "eventFlags" should be 0x0 for regular events but that's not the case on OS X 10.10 at least

Expand Down
Loading