From 5d452122b350c216a5f35d485de8e76f85eb5e67 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 7 Feb 2026 22:09:05 +1100 Subject: [PATCH] Stop fetch github PRs when checking out a branch They aren't going to change when you check out a branch, and they take a long time to fetch. --- pkg/gui/controllers/helpers/refs_helper.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkg/gui/controllers/helpers/refs_helper.go b/pkg/gui/controllers/helpers/refs_helper.go index d52d9bbad..7b58edc1e 100644 --- a/pkg/gui/controllers/helpers/refs_helper.go +++ b/pkg/gui/controllers/helpers/refs_helper.go @@ -54,7 +54,19 @@ func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions // loading a heap of commits is slow so we limit them whenever doing a reset self.c.Contexts().LocalCommits.SetLimitCommits(true) - self.c.Refresh(types.RefreshOptions{Mode: types.BLOCK_UI, KeepBranchSelectionIndex: true}) + self.c.Refresh(types.RefreshOptions{Mode: types.BLOCK_UI, KeepBranchSelectionIndex: true, Scope: []types.RefreshableView{ + types.COMMITS, + types.BRANCHES, + types.FILES, + types.STASH, + types.REFLOG, + types.TAGS, + types.REMOTES, + types.WORKTREES, + types.STATUS, + types.BISECT_INFO, + types.STAGING, + }}) } localBranch, found := lo.Find(self.c.Model().Branches, func(branch *models.Branch) bool {