Factor out CommitLoader.mainBranches into its own class, and store it in Model

This commit is contained in:
Stefan Haller 2024-04-29 18:37:34 +02:00
parent b2011dca35
commit f4d922bc80
7 changed files with 116 additions and 68 deletions

View file

@ -331,6 +331,7 @@ func (self *RefreshHelper) refreshCommitsWithLimit() error {
RefName: self.refForLog(),
RefForPushedStatus: checkedOutBranchName,
All: self.c.Contexts().LocalCommits.GetShowWholeGitGraph(),
MainBranches: self.c.Model().MainBranches,
},
)
if err != nil {
@ -357,6 +358,7 @@ func (self *RefreshHelper) refreshSubCommitsWithLimit() error {
RefName: self.c.Contexts().SubCommits.GetRef().FullRefName(),
RefToShowDivergenceFrom: self.c.Contexts().SubCommits.GetRefToShowDivergenceFrom(),
RefForPushedStatus: self.c.Contexts().SubCommits.GetRef().FullRefName(),
MainBranches: self.c.Model().MainBranches,
},
)
if err != nil {