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.
300fde7b70Albert Bogusz committed on 6/8/2026, 6:37:40 PM· committed by GitHubparent7eda382
1 file changedLine totals unavailable