From 95d057d3ce43e83ef1e38a6fffa87b303077e56c Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Sat, 19 Apr 2014 12:48:15 +0400 Subject: [PATCH] Github: fix invalid condition we should warn when there are not merged commits, not when there are no of them * fix error message spacing --- .../plugins/github/GithubCreatePullRequestWorker.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestWorker.java b/plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestWorker.java index d06851c89b97..4888e0609a90 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestWorker.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestWorker.java @@ -306,16 +306,16 @@ public class GithubCreatePullRequestWorker { return true; } if (info.getInfo().getBranchToHeadCommits(myGitRepository).isEmpty()) { - GithubNotifications.showWarningDialog(myProject, CANNOT_CREATE_PULL_REQUEST, "Can't create empty pull request: the branch" + + GithubNotifications.showWarningDialog(myProject, CANNOT_CREATE_PULL_REQUEST, "Can't create empty pull request: the branch " + getCurrentBranch() + " in fully merged to the branch " + targetBranch + "."); return false; } - if (info.getInfo().getHeadToBranchCommits(myGitRepository).isEmpty()) { + if (!info.getInfo().getHeadToBranchCommits(myGitRepository).isEmpty()) { return GithubNotifications - .showYesNoDialog(myProject, "The branch" + targetBranch + " in not fully merged to the branch " + getCurrentBranch(), + .showYesNoDialog(myProject, "The branch " + targetBranch + " in not fully merged to the branch " + getCurrentBranch(), "Do you want to proceed anyway?") == Messages.YES; }