@Override
    public void onSuccess() {
      if (myDialog != null) {
        myDialog.show();
        if (myDialog.isOK()) {
          myDialog.rebaseAndPush();
        }
      }

      ApplicationManager.getApplication()
          .invokeLater(
              new Runnable() {
                @Override
                public void run() {
                  for (VirtualFile root : myVcsRoots) {
                    GitRepositoryManager.getInstance(myProject)
                        .updateRepository(root, GitRepository.TrackedTopic.ALL);
                  }
                }
              });
    }
    @Override
    public void run(@NotNull ProgressIndicator indicator) {
      final List<Root> emptyRoots =
          loadRoots(
              myProject,
              myVcsRoots,
              myExceptions,
              false); // collect roots without fetching - just to show dialog
      if (!myExceptions.isEmpty()) {
        myExceptions.addAll(myExceptions);
        return;
      }
      myDialog = new GitPushActiveBranchesDialog(myProject, myVcsRoots, emptyRoots);
      myDialog.refreshTree(true, null, false); // start initial fetch

      indicator
          .stop(); // if indicator is not stopped, the progress would be displayed all the time the
      // dialog is displayed.
    }