diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-02-24 12:27:27 +0100 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-03-02 10:17:58 +0100 |
commit | 418b316fabf394e14a7c1153f514a52bee48ec39 (patch) | |
tree | ee8de63de2cf293f77b1c74d15f6cca4704992c7 /pkg | |
parent | fd8ce7d779902de3db5b5c9886ef62ed08cae8aa (diff) |
Rename showBranchMarkerForHeadCommit parameter to hasRebaseUpdateRefsConfig
Name it after what it is rather than what it is used for. In the next commit we
will use it for another condition.
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/gui/context/local_commits_context.go | 4 | ||||
-rw-r--r-- | pkg/gui/context/sub_commits_context.go | 4 | ||||
-rw-r--r-- | pkg/gui/presentation/commits.go | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/pkg/gui/context/local_commits_context.go b/pkg/gui/context/local_commits_context.go index cc166a8ec..604d51205 100644 --- a/pkg/gui/context/local_commits_context.go +++ b/pkg/gui/context/local_commits_context.go @@ -38,14 +38,14 @@ func NewLocalCommitsContext(c *ContextCommon) *LocalCommitsContext { } showYouAreHereLabel := c.Model().WorkingTreeStateAtLastCommitRefresh == enums.REBASE_MODE_REBASING - showBranchMarkerForHeadCommit := c.Git().Config.GetRebaseUpdateRefs() + hasRebaseUpdateRefsConfig := c.Git().Config.GetRebaseUpdateRefs() return presentation.GetCommitListDisplayStrings( c.Common, c.Model().Commits, c.Model().Branches, c.Model().CheckedOutBranch, - showBranchMarkerForHeadCommit, + hasRebaseUpdateRefsConfig, c.State().GetRepoState().GetScreenMode() != types.SCREEN_NORMAL, c.Modes().CherryPicking.SelectedShaSet(), c.Modes().Diffing.Ref, diff --git a/pkg/gui/context/sub_commits_context.go b/pkg/gui/context/sub_commits_context.go index 7a797e61d..d98188b91 100644 --- a/pkg/gui/context/sub_commits_context.go +++ b/pkg/gui/context/sub_commits_context.go @@ -55,13 +55,13 @@ func NewSubCommitsContext( if viewModel.GetShowBranchHeads() { branches = c.Model().Branches } - showBranchMarkerForHeadCommit := c.Git().Config.GetRebaseUpdateRefs() + hasRebaseUpdateRefsConfig := c.Git().Config.GetRebaseUpdateRefs() return presentation.GetCommitListDisplayStrings( c.Common, c.Model().SubCommits, branches, viewModel.GetRef().RefName(), - showBranchMarkerForHeadCommit, + hasRebaseUpdateRefsConfig, c.State().GetRepoState().GetScreenMode() != types.SCREEN_NORMAL, c.Modes().CherryPicking.SelectedShaSet(), c.Modes().Diffing.Ref, diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go index ac1006c3d..97f7c801d 100644 --- a/pkg/gui/presentation/commits.go +++ b/pkg/gui/presentation/commits.go @@ -41,7 +41,7 @@ func GetCommitListDisplayStrings( commits []*models.Commit, branches []*models.Branch, currentBranchName string, - showBranchMarkerForHeadCommit bool, + hasRebaseUpdateRefsConfig bool, fullDescription bool, cherryPickedCommitShaSet *set.Set[string], diffName string, @@ -123,7 +123,7 @@ func GetCommitListDisplayStrings( !lo.Contains(common.UserConfig.Git.MainBranches, b.Name) && // Don't show a marker for the head commit unless the // rebase.updateRefs config is on - (showBranchMarkerForHeadCommit || b.CommitHash != commits[0].Sha) + (hasRebaseUpdateRefsConfig || b.CommitHash != commits[0].Sha) })) lines := make([][]string, 0, len(filteredCommits)) |