From 98c19feccfbb9bffcd2e61c4d21ed61c72b87f33 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 5 Apr 2025 11:05:46 +0200 Subject: [PATCH] Add new commit status StatusCherryPickingOrReverting This is needed because we want to show different section headers for rebase todos and cherry-pick/revert todos. --- pkg/commands/git_commands/commit_loader.go | 2 +- pkg/commands/models/commit.go | 1 + pkg/gui/presentation/commits.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/commands/git_commands/commit_loader.go b/pkg/commands/git_commands/commit_loader.go index 2f4556bb9..96b3d1b13 100644 --- a/pkg/commands/git_commands/commit_loader.go +++ b/pkg/commands/git_commands/commit_loader.go @@ -496,7 +496,7 @@ func (self *CommitLoader) getSequencerCommits() []*models.Commit { commits = utils.Prepend(commits, &models.Commit{ Hash: t.Commit, Name: t.Msg, - Status: models.StatusRebasing, + Status: models.StatusCherryPickingOrReverting, Action: t.Command, }) } diff --git a/pkg/commands/models/commit.go b/pkg/commands/models/commit.go index b65947055..085404d8f 100644 --- a/pkg/commands/models/commit.go +++ b/pkg/commands/models/commit.go @@ -18,6 +18,7 @@ const ( StatusPushed StatusMerged StatusRebasing + StatusCherryPickingOrReverting StatusConflicted StatusReflog ) diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go index b2cff6e43..8296198fc 100644 --- a/pkg/gui/presentation/commits.go +++ b/pkg/gui/presentation/commits.go @@ -505,7 +505,7 @@ func getHashColor( hashColor = style.FgYellow case models.StatusMerged: hashColor = style.FgGreen - case models.StatusRebasing, models.StatusConflicted: + case models.StatusRebasing, models.StatusCherryPickingOrReverting, models.StatusConflicted: hashColor = style.FgBlue case models.StatusReflog: hashColor = style.FgBlue