# Fix watching of Git repo in presence of scanner restarts \(\#37052\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/8af212e7853f88bd193d27e334f94bfc8d8bc5d1)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 8af212e7853f88bd193d27e334f94bfc8d8bc5d1

Requested commit: 8af212e7853f88bd193d27e334f94bfc8d8bc5d1

Commit: 8af212e7853f88bd193d27e334f94bfc8d8bc5d1

Tree: 54cac8e8f59f1330964cabf116802f8cb21c78f4

Author: Michael Sloan

Committer: GitHub

## Message

```
Fix watching of Git repo in presence of scanner restarts (#37052)

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>
```

## Parents

- [b233df8343b5f7316296995ced951dc166e56c7d](https://git.cafe/gitcafe/zed/commit/b233df8343b5f7316296995ced951dc166e56c7d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/8af212e7853f88bd193d27e334f94bfc8d8bc5d1?format=markdown)
