diff options
author | Jesse Duffield Duffield <jesseduffieldduffield@Jesses-MacBook-Pro-3.local> | 2019-02-24 17:34:19 +1100 |
---|---|---|
committer | Jesse Duffield Duffield <jesseduffieldduffield@Jesses-MacBook-Pro-3.local> | 2019-02-24 17:34:19 +1100 |
commit | f4938deaaeb163dc0791f38dfbeee0f88e8cef56 (patch) | |
tree | 11840e5d2c4130494cc73574d06dc9d19d4a6737 /pkg/git/commit_list_builder.go | |
parent | 639df512f3c7cb97ba7a4ab904f52457617384d0 (diff) |
change type of cherryPickedCommits from []string to []*Commit
Diffstat (limited to 'pkg/git/commit_list_builder.go')
-rw-r--r-- | pkg/git/commit_list_builder.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pkg/git/commit_list_builder.go b/pkg/git/commit_list_builder.go index 3de255d02..6ae6efeee 100644 --- a/pkg/git/commit_list_builder.go +++ b/pkg/git/commit_list_builder.go @@ -23,21 +23,21 @@ import ( // CommitListBuilder returns a list of Branch objects for the current repo type CommitListBuilder struct { - Log *logrus.Entry - GitCommand *commands.GitCommand - OSCommand *commands.OSCommand - Tr *i18n.Localizer - CherryPickedShas []string + Log *logrus.Entry + GitCommand *commands.GitCommand + OSCommand *commands.OSCommand + Tr *i18n.Localizer + CherryPickedCommits []*commands.Commit } // NewCommitListBuilder builds a new commit list builder -func NewCommitListBuilder(log *logrus.Entry, gitCommand *commands.GitCommand, osCommand *commands.OSCommand, tr *i18n.Localizer, cherryPickedShas []string) (*CommitListBuilder, error) { +func NewCommitListBuilder(log *logrus.Entry, gitCommand *commands.GitCommand, osCommand *commands.OSCommand, tr *i18n.Localizer, cherryPickedCommits []*commands.Commit) (*CommitListBuilder, error) { return &CommitListBuilder{ - Log: log, - GitCommand: gitCommand, - OSCommand: osCommand, - Tr: tr, - CherryPickedShas: cherryPickedShas, + Log: log, + GitCommand: gitCommand, + OSCommand: osCommand, + Tr: tr, + CherryPickedCommits: cherryPickedCommits, }, nil } @@ -159,8 +159,8 @@ func (c *CommitListBuilder) setCommitMergedStatuses(commits []*commands.Commit) func (c *CommitListBuilder) setCommitCherryPickStatuses(commits []*commands.Commit) ([]*commands.Commit, error) { for _, commit := range commits { - for _, sha := range c.CherryPickedShas { - if commit.Sha == sha { + for _, cherryPickedCommit := range c.CherryPickedCommits { + if commit.Sha == cherryPickedCommit.Sha { commit.Copied = true } } |