Suppress or prevent duplicate inotifywait events?

前端 未结 2 1242
臣服心动
臣服心动 2021-01-16 03:13

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,

2条回答
  •  野的像风
    2021-01-16 03:56

    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.

提交回复
热议问题