mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
Don't show branch head on rebase todos if the rebase.updateRefs config is on
The additional branch head icon is more confusing than useful in this situation. The update-ref entries show very clearly where the branch heads will go when continuing the rebase; the information where the branch heads used to be before the rebase is not really needed here, and just makes the display more confusing. I'm not adding more tests here because the changes to the existing tests demonstrate the change clearly enough.
This commit is contained in:
@ -145,6 +145,7 @@ func GetCommitListDisplayStrings(
|
||||
common,
|
||||
commit,
|
||||
branchHeadsToVisualize,
|
||||
hasRebaseUpdateRefsConfig,
|
||||
cherryPickedCommitShaSet,
|
||||
isMarkedBaseCommit,
|
||||
willBeRebased,
|
||||
@ -296,6 +297,7 @@ func displayCommit(
|
||||
common *common.Common,
|
||||
commit *models.Commit,
|
||||
branchHeadsToVisualize *set.Set[string],
|
||||
hasRebaseUpdateRefsConfig bool,
|
||||
cherryPickedCommitShaSet *set.Set[string],
|
||||
isMarkedBaseCommit bool,
|
||||
willBeRebased bool,
|
||||
@ -329,7 +331,11 @@ func displayCommit(
|
||||
tagString = theme.DiffTerminalColor.SetBold().Sprint(strings.Join(commit.Tags, " ")) + " "
|
||||
}
|
||||
|
||||
if branchHeadsToVisualize.Includes(commit.Sha) && commit.Status != models.StatusMerged {
|
||||
if branchHeadsToVisualize.Includes(commit.Sha) &&
|
||||
// Don't show branch head on commits that are already merged to a main branch
|
||||
commit.Status != models.StatusMerged &&
|
||||
// Don't show branch head on a "pick" todo if the rebase.updateRefs config is on
|
||||
!(commit.IsTODO() && hasRebaseUpdateRefsConfig) {
|
||||
tagString = style.FgCyan.SetBold().Sprint(
|
||||
lo.Ternary(icons.IsIconEnabled(), icons.BRANCH_ICON, "*") + " " + tagString)
|
||||
}
|
||||
|
Reference in New Issue
Block a user