@@ -106,14 +106,14 @@ func GetCommitListDisplayStrings(
106
106
// that are not the current branch, and not any of the main branches. The
107
107
// goal is to visualize stacks of local branches, so anything that doesn't
108
108
// contribute to a branch stack shouldn't show a marker.
109
- branchHeadsToVisualize := lo .FilterMap (branches ,
109
+ branchHeadsToVisualize := lo .SliceToMap ( lo . FilterMap (branches ,
110
110
func (b * models.Branch , index int ) (string , bool ) {
111
111
return b .CommitHash ,
112
112
// Don't show a marker for the current branch
113
113
b .Name != currentBranchName &&
114
114
// Don't show a marker for main branches
115
115
! lo .Contains (common .UserConfig .Git .MainBranches , b .Name )
116
- })
116
+ }), func ( s string ) ( string , struct {}) { return s , struct {}{} })
117
117
118
118
lines := make ([][]string , 0 , len (filteredCommits ))
119
119
var bisectStatus BisectStatus
@@ -277,7 +277,7 @@ func getBisectStatusText(bisectStatus BisectStatus, bisectInfo *git_commands.Bis
277
277
func displayCommit (
278
278
common * common.Common ,
279
279
commit * models.Commit ,
280
- branchHeadsToVisualize [] string ,
280
+ branchHeadsToVisualize map [ string ] struct {} ,
281
281
cherryPickedCommitShaSet * set.Set [string ],
282
282
diffName string ,
283
283
timeFormat string ,
@@ -307,7 +307,7 @@ func displayCommit(
307
307
} else {
308
308
if len (commit .Tags ) > 0 {
309
309
tagString = theme .DiffTerminalColor .SetBold ().Sprint (strings .Join (commit .Tags , " " )) + " "
310
- } else if lo . Contains ( branchHeadsToVisualize , commit .Sha ) && commit .Status != models .StatusMerged {
310
+ } else if _ , found := branchHeadsToVisualize [ commit .Sha ]; found && commit .Status != models .StatusMerged {
311
311
tagString = style .FgCyan .SetBold ().Sprint (
312
312
lo .Ternary (icons .IsIconEnabled (), icons .BRANCH_ICON , "*" ) + " " )
313
313
}
0 commit comments