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; }