Summary
If you switch to a terminal and run git commands (checkout, rebase, reset, stash pop) then switch back to Zed, the git panel can show stale branch and file status. Same thing happens after laptop sleep/wake.
Root cause
Git state only refreshes when Zed detects changes inside .git/ via filesystem events. If those events are lost (sleep/wake, heavy IO, OS event coalescing), the stale state persists indefinitely. There's no rescan on window activation and no manual refresh.
Steps to reproduce
- Open a project in Zed with the git panel visible
- Switch to a terminal and run
git checkout -b new-branch or modify/stage files
- Switch back to Zed
- Git panel may still show the old branch or old file status
Most reliably triggered after laptop sleep/wake, where FSEvents are known to get dropped.
Related to #38109, #13176.
Summary
If you switch to a terminal and run git commands (checkout, rebase, reset, stash pop) then switch back to Zed, the git panel can show stale branch and file status. Same thing happens after laptop sleep/wake.
Root cause
Git state only refreshes when Zed detects changes inside
.git/via filesystem events. If those events are lost (sleep/wake, heavy IO, OS event coalescing), the stale state persists indefinitely. There's no rescan on window activation and no manual refresh.Steps to reproduce
git checkout -b new-branchor modify/stage filesMost reliably triggered after laptop sleep/wake, where FSEvents are known to get dropped.
Related to #38109, #13176.