Closed tumblingG closed 1 year ago
After some modifications to a local git repo, it outputs:
❯ ./watch .
update .git/.gitstatus.N0Qvnh
update .git/.gitstatus.N0Qvnh/a
update .git/.gitstatus.N0Qvnh/b
remove .git/.gitstatus.N0Qvnh/b/1
remove .git/.gitstatus.N0Qvnh/a/1
remove .git/.gitstatus.N0Qvnh/b
remove .git/.gitstatus.N0Qvnh/a
remove .git/.gitstatus.N0Qvnh
update s
remove s
So It works properly on my machine (macOS).
Could you please provide more infomation and a sample test code?
As shown in the figure above, when I switch branches, sometimes files and folders change together, sometimes only folders change. I tried to write a similar demo, but failed. My environment is window
sometimes only folders change
This is an expected behavior of fs.watch
when a folder is being deleted. We can't fix that unless the initial scan
is implemented. Related issue: https://github.com/yuanchuan/node-watch/issues/58
can we fix this problem?
https://github.com/nodejs/node/issues/5039