# Fix stale Git UI on reftable repositories on Linux \(\#58719\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 300fde7b709ce5638bdea34eba3b070fe5bc9b19

Requested commit: 300fde7b709ce5638bdea34eba3b070fe5bc9b19

Commit: 300fde7b709ce5638bdea34eba3b070fe5bc9b19

Tree: a96623b2e34f0b3ca066c9bedf052eb5e267d4f5

Author: Albert Bogusz

Committer: GitHub

## Message

```
Fix stale Git UI on reftable repositories on Linux (#58719)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

The non-recursive Linux watcher causes subdirectories inside `.git/` to
need explicit watching. For repos using the reftable backend, all ref
data lives in `.git/reftable/`. Operations in the UI like uncommitting
and creating new branches only modify refs inside `.git/reftable`
without changing `.git/HEAD`'s contents, so no inotify event fires on
`.git/` itself and the git UI never refreshes.

Essentially all this change does is check if `.git/reftable/` exists and
if it does, add it to the watcher. On the recursive macOS/Windows
watchers, `FsWatcher::add` returns early safely so this *should* not be
a performance loss apart from the brief lookup.

Release Notes:

- Fixed Git UI not refreshing on Linux for repositories using the
reftable backend.
```

## Parents

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

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