mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-21 04:46:29 +03:00
refreshRemotes now loads the remotes on the worker and writes Model.Remotes, rebuilds the pull-requests map, and updates the selected remote's RemoteBranches inside an onUIThreadUnlessRepoChanged bounce. RemotesController.addAndCheckoutRemote read Model.Remotes right after its SYNC REMOTES refresh to select the newly-added remote; since that write now bounces, the selection (and the follow-up fetch) move into Then so they run against the post-refresh model rather than the stale one. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>