Store commit.Action as an enum instead of a string

The main reason for doing this (besides the reasons given for Status in the
previous commit) is that it allows us to easily convert from TodoCommand to
Action and back. This will be needed later in the branch. Fortunately,
TodoCommand is one-based, so this allows us to add an ActionNone constant with
the value 0.
This commit is contained in:
Stefan Haller 2023-04-03 12:42:29 +02:00
parent 188773511e
commit c53c5e47ef
7 changed files with 57 additions and 45 deletions

View file

@ -313,7 +313,7 @@ func (self *CommitLoader) getInteractiveRebasingCommits() ([]*models.Commit, err
Sha: t.Commit,
Name: t.Msg,
Status: models.StatusRebasing,
Action: t.Command.String(),
Action: t.Command,
})
}