Currently inotifywait
is watching git server folders. End it emits only when specific file modified. The problem is, when changes are pushed to git server,
As I mentioned in your other question, you can setup first a post-receive hook which would checkout the repo for you whenever there is a push done to the Git server.
Not only can you test your inotify
function when monitoring those files changed on checkout, but you could even consider not using inotify
at all, and using the hook to trigger your notification.
A post-receive hook can list files, and you can then trigger your notification only for certain files.