private void doAbort(final boolean rollback) {
    boolean[] success = new boolean[1];

    new GitFreezingProcess(myProject, GitBundle.message("activity.name.rebase"), () -> {
      String activityName = GitBundle.message("activity.name.abort.command", GitBundle.message("abort.operation.rebase.name"));
      try (AccessToken ignore = DvcsUtil.workingTreeChangeStarted(myProject, activityName, GitActivity.Abort)) {
        if (myRepositoryToAbort != null) {
          myIndicator.setText2(GitBundle.message(
            "rebase.abort.progress.indicator.command.in.repo.title",
            "git rebase --abort",
            getShortRepositoryName(myRepositoryToAbort)
          ));
          Hash startHash = GitUtil.getHead(myRepositoryToAbort);
          GitCommandResult result = myGit.rebaseAbort(myRepositoryToAbort);
          if (result.success()) {
            GitUtil.updateAndRefreshChangedVfs(myRepositoryToAbort, startHash);
          }
          else {
            myNotifier.notifyError(
              REBASE_ABORT_FAILED,
              GitBundle.message("rebase.abort.notification.failed.title"),
              result.getErrorOutputAsHtmlString() + mentionLocalChangesRemainingInStash(mySaver),
              true);
            return;
          }
        }

        if (rollback) {
          for (GitRepository repo : myRepositoriesToRollback.keySet()) {
            myIndicator.setText2(GitBundle.message(
              "rebase.abort.progress.indicator.command.in.repo.title",
              "git reset --keep",
              getShortRepositoryName(repo)
            ));
            Hash startHash = GitUtil.getHead(repo);
            GitCommandResult res = myGit.reset(repo, GitResetMode.KEEP, myRepositoriesToRollback.get(repo));

            if (res.success()) {
              String initialBranchPosition = myInitialCurrentBranches.get(repo);
              if (initialBranchPosition != null && !initialBranchPosition.equals(repo.getCurrentBranchName())) {
                myIndicator.setText2(GitBundle.message(
                  "rebase.abort.progress.indicator.command.in.repo.title",
                  "git checkout " + initialBranchPosition,
                  getShortRepositoryName(repo)
                ));
                res = myGit.checkout(repo, initialBranchPosition, null, true, false);
              }
            }

            if (!res.success()) {
              String description;
              if (myRepositoryToAbort != null) {
                description = GitBundle.message(
                  "rebase.abort.notification.warning.rollback.failed.with.repo.message",
                  getShortRepositoryName(myRepositoryToAbort),
                  repo,
                  res.getErrorOutputAsHtmlString(),
                  mentionLocalChangesRemainingInStash(mySaver)
                );
              }
              else {
                description = GitBundle.message(
                  "rebase.abort.notification.warning.rollback.failed.message",
                  getShortRepositoryName(repo),
                  res.getErrorOutputAsHtmlString(),
                  mentionLocalChangesRemainingInStash(mySaver)
                );
              }
              myNotifier.notifyImportantWarning(
                REBASE_ROLLBACK_FAILED,
                GitBundle.message("rebase.abort.notification.warning.rollback.failed.title"),
                description
              );
              return;
            }

            GitUtil.updateAndRefreshChangedVfs(repo, startHash);
          }
        }

        success[0] = true;
      }
    }).execute();

    if (success[0]) {
      ChangeListManagerEx.getInstanceEx(myProject).waitForUpdate();

      if (mySaver != null) {
        mySaver.load();
      }
      if (myNotifySuccess) {
        myNotifier.notifySuccess(REBASE_ABORT_SUCCESS, "", GitBundle.message("rebase.abort.notification.successful.message"));
      }
    }
  }
private void doAbort(final boolean rollback)