Skip to content

inotify monitor doesn't detect fast file creation recursively #330

@gbroques

Description

@gbroques

Hi, it doesn't seem like the inotify monitor properly detects file creation recursively.

I'm using this to detect changes to the .git/ directory.

The following are steps to reproduce (using bash as a terminal):

mkdir test
cd test
git init
fswatch -rx .git/
echo "one" > 1.txt
git add 1.txt

I see the following directory is created:

/path/to/test/.git/objects/56 Created

However, I would expect to see the object file itself being created:

# Missing ❌👇
/path/to/test/.git/objects/56/26abf0f72e58d7a153368ba57db4c673c0e171

I tested using version 1.14.0.


As an aside, inotifywait correctly detects this:

inotifywait -m .git/ -r

Then you see the following output:

.git/objects/56/ CREATE 26abf0f72e58d7a153368ba57db4c673c0e171

However, it's my understanding that inotifywait has additional code on top of inotify for recursive watching.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions