Fix watching of Git repo in presence of scanner restarts (#37052)
Michael Sloan
and
Julia
created
The scanner is restarted after loading initial settings, and there was
an optimization to not re-discover and re-watch git repositories if they
already exist in the snapshot. #35865 added cleanup of watches that
occurred when the scanner restarts, and so in some cases repos were no
longer watched.
Release Notes:
- Linux: Fixed a case where Git repositories might not be watched for
changes, causing branch switching to not update the UI.
Co-authored-by: Julia <julia@zed.dev>