From 349bcc3691b7e5ee651129940e5550e78aaafccf Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Wed, 23 Sep 2026 13:39:56 +0200 Subject: [PATCH] Rename the loadBehindCounts parameter to loadExtraInfo The flag says whether this load is the one that kicks off the values determined in the background afterwards. A later commit adds a second of those next to the behind-counts, so name the flag after what it controls rather than after its only user so far. Co-Authored-By: Claude Opus 5 (1M context) --- pkg/commands/git_commands/branch_loader.go | 4 ++-- pkg/gui/controllers/helpers/refresh_helper.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/commands/git_commands/branch_loader.go b/pkg/commands/git_commands/branch_loader.go index e4ccc6ab7..10d9ad30c 100644 --- a/pkg/commands/git_commands/branch_loader.go +++ b/pkg/commands/git_commands/branch_loader.go @@ -67,7 +67,7 @@ func NewBranchLoader( func (self *BranchLoader) Load(reflogCommits []*models.Commit, mainBranches *MainBranches, oldBranches []*models.Branch, - loadBehindCounts bool, + loadExtraInfo bool, onWorker func(func() error), renderFunc func(), ) ([]*models.Branch, error) { @@ -144,7 +144,7 @@ func (self *BranchLoader) Load(reflogCommits []*models.Commit, } } - if loadBehindCounts && self.UserConfig().Gui.ShowDivergenceFromBaseBranch != "none" { + if loadExtraInfo && self.UserConfig().Gui.ShowDivergenceFromBaseBranch != "none" { onWorker(func() error { return self.GetBehindBaseBranchValuesForAllBranches(branches, mainBranches, renderFunc) }) diff --git a/pkg/gui/controllers/helpers/refresh_helper.go b/pkg/gui/controllers/helpers/refresh_helper.go index 79488ed9d..6c96d79c6 100644 --- a/pkg/gui/controllers/helpers/refresh_helper.go +++ b/pkg/gui/controllers/helpers/refresh_helper.go @@ -1150,14 +1150,14 @@ func (self *RefreshHelper) refreshStateSubmoduleConfigs(env refreshEnv) ([]*mode // self.refreshStatus is called at the end of this because that's when we can // be sure there is a State.Model.Branches array to pick the current branch from -func (self *RefreshHelper) refreshBranches(captured capturedBranchState, waitForWorktrees func(), waitForRemotes func(), branchSelection types.BranchSelectionBehavior, loadBehindCounts bool, reflogCommits []*models.Commit, env refreshEnv) []*models.Branch { +func (self *RefreshHelper) refreshBranches(captured capturedBranchState, waitForWorktrees func(), waitForRemotes func(), branchSelection types.BranchSelectionBehavior, loadExtraInfo bool, reflogCommits []*models.Commit, env refreshEnv) []*models.Branch { loadSeq := self.branchLoadSeq.Add(1) branches, err := env.git.Loaders.BranchLoader.Load( reflogCommits, captured.mainBranches, captured.oldBranches, - loadBehindCounts, + loadExtraInfo, func(f func() error) { self.onWorker(env.background, func(_ gocui.Task) error { err := f()