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.
This commit is contained in:
Kirill Likhodedov
2017-02-07 11:51:05 +00:00
parent 6d508bb74e
commit 6b3e8f81b2
@@ -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");
}