From 6b3e8f81b20498ce009f04e83f41ee4776aec2e7 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Thu, 12 Jan 2017 19:25:33 +0300 Subject: [PATCH] git: fix detection of "nothing to commit" situation Git reports both to stdout and stderr in such situations, so the condition was always met. If there is a more critical error during cherry-pick command execution, Git doesn't report the "nothing to commit" error, so there is no need in such condition anyway. --- plugins/git4idea/src/git4idea/cherrypick/GitCherryPicker.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/git4idea/src/git4idea/cherrypick/GitCherryPicker.java b/plugins/git4idea/src/git4idea/cherrypick/GitCherryPicker.java index bf7cd173f140..289806c256d0 100644 --- a/plugins/git4idea/src/git4idea/cherrypick/GitCherryPicker.java +++ b/plugins/git4idea/src/git4idea/cherrypick/GitCherryPicker.java @@ -204,9 +204,6 @@ public class GitCherryPicker extends VcsCherryPicker { } private static boolean isNothingToCommitMessage(@NotNull GitCommandResult result) { - if (!result.getErrorOutputAsJoinedString().isEmpty()) { - return false; - } String stdout = result.getOutputAsJoinedString(); return stdout.contains("nothing to commit") || stdout.contains("previous cherry-pick is now empty"); }