Fixed Git PushActiveBranches when remote commit is pushed after the dialog is invoked.
authorKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Mon, 21 Mar 2011 12:43:03 +0000 (15:43 +0300)
committerKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Mon, 21 Mar 2011 12:43:03 +0000 (15:43 +0300)
plugins/git4idea/src/git4idea/checkin/GitPushActiveBranchesDialog.java

index 24aea2fefd3e22459087111b1c662926d3a38a41..bf0f717ee0e0e9bdb09e6444f7d494f773152fb4 100644 (file)
@@ -232,7 +232,7 @@ public class GitPushActiveBranchesDialog extends DialogWrapper {
         List<VcsException> exceptions = new ArrayList<VcsException>();
         List<VcsException> pushExceptions = new ArrayList<VcsException>();
         for (int i = 0; i < 3; i++) {
-          final RebaseInfo rebaseInfo = collectRebaseInfo();
+          RebaseInfo rebaseInfo = collectRebaseInfo();
 
           if (rebaseInfo.reorderedCommits.isEmpty()) { // if we have to reorder commits, rebase must pre
             final Collection<Root> rootsToPush = getRootsToPush(); // collect roots from the dialog
@@ -262,6 +262,7 @@ public class GitPushActiveBranchesDialog extends DialogWrapper {
           updateTree(roots, rebaseInfo.uncheckedCommits);
 
           if (isRebaseNeeded()) {
+            rebaseInfo = collectRebaseInfo();
             executeRebase(exceptions, rebaseInfo);
             if (!exceptions.isEmpty()) {
               notifyMessage(myProject, "Failed to rebase", null, NotificationType.ERROR, true, exceptions);