bevry/watchr — pull request #38 by delfick (2013-03-03 02:00:00+00:00)
Title: Make it handle how vim saves files

It would appear that the way vim saves files breaks how watchr determines when something has changed.

So, my change does:

* Assumes args into listener always has [event, fragment]
* Uses isIgnoredFile on the fragment, so I can add /^4913$/ to the ignored patterns and have it ignore vim's test 4913 file (https://bugzilla.redhat.com/show_bug.cgi?id=427711)
* Says if listening on a file and the event is a rename to itself then we ignore it because a change event will happen.
* A directory is not the same if the event is a change, even if the size and mtimes are the same.

Unfortunately, I'm not entirely sure if this has any undesired side effects. I'm hoping you people will have a better idea of such things :)

Thankyou.