File watcher starts many times when many files are changing, for example, after git checkout

How to make file watcher to start once? I need this, because I have a script, that concatenate all files in one. And I need to start file watcher only one time after loading all files.

4 comments

Not sure I follow you... Is it your script that is configured as a file watcher? Can you explain what you mean by files loading? Watcher is designed to listen to file changes, not to file loading. If you like your script to only run at certain moments, I'd suggest to configure it as external tool instead of using file watchers

0

I meen that when I do "git checkout", git can change many files at once. And my file watcher starts many times (on changing every file) and do the same result many times.
What i need: "git checkout" -> all files changed -> file watcher starts one time and concatenates all files in one by my script

0

As your file watcher is listening to changes in multiple files, it runs every time one of the files is changed, so changing multiple files simultaneouisly results in multiple watcher processes - this is expected. I'd really suggest using external tools here - you can then run your tool explicitly after each Git checkout

0

Please sign in to leave a comment.