diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2023-08-05 12:06:37 +0200 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2023-08-29 08:16:40 +0200 |
commit | 572d1b5920104b06b3297e3861454f14738bf71b (patch) | |
tree | 9db9d700ae648f03544e7cf6d3af4d7c5c91be15 /pkg/gui/presentation | |
parent | e8fac6ca7360faf5db1c82af2b2e9c87aa5a5edc (diff) |
Add "Show divergence from upstream" entry to Upstream menu in branches panel
Diffstat (limited to 'pkg/gui/presentation')
-rw-r--r-- | pkg/gui/presentation/commits.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go index 6ae04f95a..b4297f6ed 100644 --- a/pkg/gui/presentation/commits.go +++ b/pkg/gui/presentation/commits.go @@ -359,7 +359,9 @@ func displayCommit( } cols := make([]string, 0, 7) - if icons.IsIconEnabled() { + if commit.Divergence != models.DivergenceNone { + cols = append(cols, shaColor.Sprint(lo.Ternary(commit.Divergence == models.DivergenceLeft, "↑", "↓"))) + } else if icons.IsIconEnabled() { cols = append(cols, shaColor.Sprint(icons.IconForCommit(commit))) } cols = append(cols, shaColor.Sprint(commit.ShortSha())) @@ -430,6 +432,8 @@ func getShaColor( shaColor = theme.DiffTerminalColor } else if cherryPickedCommitShaSet.Includes(commit.Sha) { shaColor = theme.CherryPickedCommitTextStyle + } else if commit.Divergence == models.DivergenceRight && commit.Status != models.StatusMerged { + shaColor = style.FgBlue } return shaColor |