From de98258e394c595ba36137309efe2d4290089cad Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Wed, 28 Jan 2026 09:29:45 +0100 Subject: [PATCH] Add ActionFlag field to Commit Co-authored-by: Stefan Haller --- pkg/commands/git_commands/commit_loader.go | 10 ++++++---- pkg/commands/models/commit.go | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pkg/commands/git_commands/commit_loader.go b/pkg/commands/git_commands/commit_loader.go index da4bcb7ff..8b79bd8cd 100644 --- a/pkg/commands/git_commands/commit_loader.go +++ b/pkg/commands/git_commands/commit_loader.go @@ -325,6 +325,7 @@ func (self *CommitLoader) getHydratedTodoCommits(hashPool *utils.StringPool, tod hydratedCommits = append(hydratedCommits, rebasingCommit) } else if commit := findFullCommit(rebasingCommit.Hash()); commit != nil { commit.Action = rebasingCommit.Action + commit.ActionFlag = rebasingCommit.ActionFlag commit.Status = rebasingCommit.Status hydratedCommits = append(hydratedCommits, commit) } @@ -371,10 +372,11 @@ func (self *CommitLoader) getRebasingCommits(hashPool *utils.StringPool, addConf continue } commits = utils.Prepend(commits, models.NewCommit(hashPool, models.NewCommitOpts{ - Hash: t.Commit, - Name: t.Msg, - Status: models.StatusRebasing, - Action: t.Command, + Hash: t.Commit, + Name: t.Msg, + Status: models.StatusRebasing, + Action: t.Command, + ActionFlag: t.Flag, })) } diff --git a/pkg/commands/models/commit.go b/pkg/commands/models/commit.go index 8dfec4d4b..137528ee6 100644 --- a/pkg/commands/models/commit.go +++ b/pkg/commands/models/commit.go @@ -60,6 +60,7 @@ type Commit struct { Status CommitStatus Action todo.TodoCommand + ActionFlag string // e.g. "-C" for fixup -C Divergence Divergence // set to DivergenceNone unless we are showing the divergence view } @@ -68,6 +69,7 @@ type NewCommitOpts struct { Name string Status CommitStatus Action todo.TodoCommand + ActionFlag string Tags []string ExtraInfo string AuthorName string @@ -83,6 +85,7 @@ func NewCommit(hashPool *utils.StringPool, opts NewCommitOpts) *Commit { Name: opts.Name, Status: opts.Status, Action: opts.Action, + ActionFlag: opts.ActionFlag, Tags: opts.Tags, ExtraInfo: opts.ExtraInfo, AuthorName: opts.AuthorName,