mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-01 00:54:58 +02:00
Show commit mark before showing extra info
The 'YOU ARE HERE' marking should be shown before we show things like the current tag, otherwise it could be missed
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user