Hi!
I use bra to essentially run git add -A . && git push in a git repo, any time files are modified, appear, or are deleted in a certain directory
But consider that the following may happen in the directory:
rm a.jpg b.md c.md
rm: remove regular file 'a.jpg'? y
rm: remove regular file 'b.md'? y # after a fraction of a second
rm: remove regular file 'c.md'? y # after another fraction of a second
or
touch foo1.md; sleep 0.5; touch foo2.md
In both of these scenarios, what I observe is that upon the first change, the command is invoked, but as it will run for a few seconds, the subsequent changes are concurrent and are not picked up.
By the time the additional file additions or removals are finished, the command is complete, and the modifications remain in place and are not picked up by bra.
I suggest a change to bra such that if any inotify commands come in while the command is running, the command is run again after it finishes.