@ApiStatus.Internal
  public GitUpdateResult rebase(@NotNull VirtualFile root, @NotNull List<String> parameters, @Nullable ActivityId activityId) {
    final GitLineHandler rebaseHandler = new GitLineHandler(myProject, root, GitCommand.REBASE, GitImpl.REBASE_CONFIG_PARAMS);
    rebaseHandler.setStdoutSuppressed(false);
    rebaseHandler.addParameters(parameters);

    final GitRebaseProblemDetector rebaseConflictDetector = new GitRebaseProblemDetector();
    rebaseHandler.addLineListener(rebaseConflictDetector);
    GitUntrackedFilesOverwrittenByOperationDetector untrackedFilesDetector = new GitUntrackedFilesOverwrittenByOperationDetector(root);
    GitLocalChangesWouldBeOverwrittenDetector localChangesDetector = new GitLocalChangesWouldBeOverwrittenDetector(root, CHECKOUT);
    rebaseHandler.addLineListener(untrackedFilesDetector);
    rebaseHandler.addLineListener(localChangesDetector);
    rebaseHandler.addLineListener(GitStandardProgressAnalyzer.createListener(myProgressIndicator));

    try (AccessToken ignore = DvcsUtil.workingTreeChangeStarted(myProject, GitBundle.message("activity.name.rebase"), activityId)) {
      GitRebaseEditorHandler editor = GitRebaseUtils.createRebaseEditor(myProject, root, false);
      try (GitHandlerRebaseEditorManager ignored = GitHandlerRebaseEditorManager.prepareEditor(rebaseHandler, editor)) {
        String oldText = myProgressIndicator.getText();
        myProgressIndicator.setText(GitBundle.message("rebase.progress.indicator.title"));
        GitCommandResult result = myGit.runCommand(rebaseHandler);
        myProgressIndicator.setText(oldText);
        return result.success() ?
               GitUpdateResult.SUCCESS :
               handleRebaseFailure(rebaseHandler, root, result, rebaseConflictDetector, untrackedFilesDetector, localChangesDetector);
      }
    }
    catch (ProcessCanceledException pce) {
      return GitUpdateResult.CANCEL;
    }
  }
@ApiStatus.Internal
  public GitUpdateResult rebase(@NotNull VirtualFile root, @NotNull List<String> parameters, @Nullable ActivityId activityId)