mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02:00
change type of cherryPickedCommits from []string to []*Commit
This commit is contained in:
parent
639df512f3
commit
f4938deaae
4 changed files with 47 additions and 51 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue