mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-24 10:13:41 -05:00
The worktrees were loaded and written by the branches refresh whenever both were in scope, because the branches view shows worktrees against branches: refreshing them separately rendered that view twice, once with worktrees that were still stale. Ordering the two is enough for that, and it leaves each scope owning its own model again. The worktrees refresh now runs first and queues its model write before it reports being done, so a branches refresh that waits for it queues its own write behind that one, and renders once with both. The worktrees scope only renders the branches view itself when nobody else is going to. As a side effect the two loads now run concurrently, where the branches refresh used to load the worktrees after its own branches. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>