From 7aed2774daff15fbceeb151a2f9d28d187fcebb1 Mon Sep 17 00:00:00 2001 From: Constantine Plotnikov Date: Thu, 5 Nov 2009 17:02:18 +0300 Subject: [PATCH] git4idea: in push active branches dialog push is enabled if no commits are selected for non-rebased root --- .../src/git4idea/checkin/GitPushActiveBranchesDialog.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/git4idea/src/git4idea/checkin/GitPushActiveBranchesDialog.java b/plugins/git4idea/src/git4idea/checkin/GitPushActiveBranchesDialog.java index 20a88fa743..bab3713e72 100644 --- a/plugins/git4idea/src/git4idea/checkin/GitPushActiveBranchesDialog.java +++ b/plugins/git4idea/src/git4idea/checkin/GitPushActiveBranchesDialog.java @@ -178,9 +178,6 @@ public class GitPushActiveBranchesDialog extends DialogWrapper { if (r.commits.size() == 0) { continue; } - if (r.remoteCommits > 0) { - return true; - } boolean seenCheckedNode = false; for (int j = 0; j < node.getChildCount(); j++) { if (node.getChildAt(j) instanceof CheckedTreeNode) { @@ -195,6 +192,9 @@ public class GitPushActiveBranchesDialog extends DialogWrapper { } } } + if (seenCheckedNode && r.remoteCommits > 0) { + return true; + } } return false; } @@ -357,7 +357,7 @@ public class GitPushActiveBranchesDialog extends DialogWrapper { continue; } Root r = (Root)node.getUserObject(); - if( seenMerges && seenUnchecked) { + if (seenMerges && seenUnchecked) { error = GitBundle.getString("push.active.error.merges.unchecked"); } if (seenMerges && reorderNeeded) { -- 2.11.4.GIT