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/commands | |
parent | 639df512f3c7cb97ba7a4ab904f52457617384d0 (diff) |
change type of cherryPickedCommits from []string to []*Commit
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/git.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 7127a427e..8d62a1e63 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -746,11 +746,11 @@ func (c *GitCommand) Revert(sha string) error { return c.OSCommand.RunCommand(fmt.Sprintf("git revert %s", sha)) } -// CherryPickShas begins an interactive rebase with the given shas being cherry picked onto HEAD -func (c *GitCommand) CherryPickShas(shas []string) error { +// CherryPickCommits begins an interactive rebase with the given shas being cherry picked onto HEAD +func (c *GitCommand) CherryPickCommits(commits []*Commit) error { todo := "" - for _, sha := range shas { - todo = "pick " + sha + "\n" + todo + for _, commit := range commits { + todo = "pick " + commit.Sha + " " + commit.Name + "\n" + todo } cmd, err := c.PrepareInteractiveRebaseCommand("HEAD", todo, false) |