mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-09 13:47:11 +02:00
Show commit mark before showing extra info (#2928)
This commit is contained in:
commit
26989ce0ee
@ -341,16 +341,17 @@ func displayCommit(
|
||||
name = emoji.Sprint(name)
|
||||
}
|
||||
|
||||
mark := ""
|
||||
if isYouAreHereCommit {
|
||||
color := lo.Ternary(commit.Action == models.ActionConflict, style.FgRed, style.FgYellow)
|
||||
youAreHere := color.Sprintf("<-- %s ---", common.Tr.YouAreHere)
|
||||
name = fmt.Sprintf("%s %s", youAreHere, name)
|
||||
mark = fmt.Sprintf("%s ", youAreHere)
|
||||
} else if isMarkedBaseCommit {
|
||||
rebaseFromHere := style.FgYellow.Sprint(common.Tr.MarkedCommitMarker)
|
||||
name = fmt.Sprintf("%s %s", rebaseFromHere, name)
|
||||
mark = fmt.Sprintf("%s ", rebaseFromHere)
|
||||
} else if !willBeRebased {
|
||||
willBeRebased := style.FgYellow.Sprint("✓")
|
||||
name = fmt.Sprintf("%s %s", willBeRebased, name)
|
||||
mark = fmt.Sprintf("%s ", willBeRebased)
|
||||
}
|
||||
|
||||
authorFunc := authors.ShortAuthor
|
||||
@ -373,7 +374,7 @@ func displayCommit(
|
||||
cols,
|
||||
actionString,
|
||||
authorFunc(commit.AuthorName),
|
||||
graphLine+tagString+theme.DefaultTextColor.Sprint(name),
|
||||
graphLine+mark+tagString+theme.DefaultTextColor.Sprint(name),
|
||||
)
|
||||
|
||||
return cols
|
||||
|
Loading…
x
Reference in New Issue
Block a user