2

I have an interesting problem, my system is a winforms, but also console app, that watchers for file changes in a folder.

Everything works great, but if that folder is a local git repo and there are operations that would change the files, the file watcher is not fired!

ex:

git restore 1.txt 

The above removes the change from the git working tree and will not trigger the filewatcher.

RollRoll
  • 8,133
  • 20
  • 76
  • 135
  • 2
    [MCVE] is missing... 99% you are listening in a wrong place or for wrong changes. – Alexei Levenkov Jul 20 '21 at 00:54
  • 1
    That might involve a file rename from %TEMP% into the directory. You could use Process Monitor to work out exactly what file operations are performed. Or maybe just watch `.git/index` – Jeremy Lakeman Jul 20 '21 at 01:22

0 Answers0