gruntjs / grunt-contrib-watch

Run tasks whenever watched files change.
http://gruntjs.com/
MIT License
1.98k stars 356 forks source link

Would it be possible to stop the watcher while something is pulled from the repository via git? #549

Closed vanBersie closed 6 years ago

vanBersie commented 6 years ago

I was thinking about implementing a watcher for certain files in a repository. When a file is changed it should be automatically moved to the server and hot swap the old file. But let's say if I would do a pull request all the files would be renewed and be swapped to the server.

How could I prevent this? Is it somehow possible to link the interrupt option with git activities (for example a pull request done by tortoise git)? Unfortunately I can't provide any code snippet since I only had theoretical thoughts about it. Could anyone provide some tips?

Thanks in advance!

shama commented 6 years ago

Beyond stopping the watch task before you use git, I have no idea.