From eef33a97be13a1c584a6e5785b207ec31e138aa2 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Wed, 21 Aug 2019 13:29:38 +0300 Subject: [PATCH] git: restore adding listeners to the cherry-pick command Accidentally removed during cleanup in 749b60a9 GitOrigin-RevId: 88adfdca19549c6f5d9b5eb474e9abe25939e21b --- plugins/git4idea/src/git4idea/cherrypick/GitCherryPicker.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/git4idea/src/git4idea/cherrypick/GitCherryPicker.java b/plugins/git4idea/src/git4idea/cherrypick/GitCherryPicker.java index 412b762a1dbe..d341b300618f 100644 --- a/plugins/git4idea/src/git4idea/cherrypick/GitCherryPicker.java +++ b/plugins/git4idea/src/git4idea/cherrypick/GitCherryPicker.java @@ -14,6 +14,7 @@ import git4idea.GitUtil; import git4idea.GitVcs; import git4idea.commands.Git; import git4idea.commands.GitCommandResult; +import git4idea.commands.GitLineHandlerListener; import git4idea.config.GitVcsApplicationSettings; import git4idea.config.GitVcsSettings; import git4idea.repo.GitRepository; @@ -44,7 +45,8 @@ public class GitCherryPicker extends VcsCherryPicker { public void cherryPick(@NotNull List commits) { GitApplyChangesProcess applyProcess = new GitApplyChangesProcess(myProject, commits, isAutoCommit(), "cherry-pick", "applied", (repository, commit, autoCommit, listeners) -> - Git.getInstance().cherryPick(repository, commit.asString(), autoCommit, shouldAddSuffix(repository, commit)), + Git.getInstance().cherryPick(repository, commit.asString(), autoCommit, shouldAddSuffix(repository, commit), + listeners.toArray(new GitLineHandlerListener[0])), result -> isNothingToCommitMessage(result), (repository, commit) -> createCommitMessage(repository, commit), true,