public @NotNull GitUpdateResult handleRebaseFailure(@NotNull GitLineHandler handler,
                                                      @NotNull VirtualFile root,
                                                      @NotNull GitCommandResult result,
                                                      @NotNull GitRebaseProblemDetector rebaseConflictDetector,
                                                      @NotNull GitMessageWithFilesDetector untrackedWouldBeOverwrittenDetector,
                                                      @NotNull GitLocalChangesWouldBeOverwrittenDetector localChangesDetector) {
    if (rebaseConflictDetector.isMergeConflict()) {
      LOG.info("handleRebaseFailure merge conflict");
      final boolean allMerged = new RebaserConflictResolver(myProject, root, this).merge();
      return allMerged ? GitUpdateResult.SUCCESS_WITH_RESOLVED_CONFLICTS : GitUpdateResult.INCOMPLETE;
    }
    else if (untrackedWouldBeOverwrittenDetector.wasMessageDetected()) {
      LOG.info("handleRebaseFailure: untracked files would be overwritten by checkout");
      GitUntrackedFilesHelper.notifyUntrackedFilesOverwrittenBy(myProject, root,
                                                                untrackedWouldBeOverwrittenDetector.getRelativeFilePaths(),
                                                                GitBundle.message("rebase.operation.name"), null);
      return GitUpdateResult.ERROR;
    }
    else if (localChangesDetector.wasMessageDetected()) {
      LocalChangesWouldBeOverwrittenHelper.showErrorNotification(
        myProject,
        LOCAL_CHANGES_DETECTED,
        root,
        GitBundle.message("rebase.git.operation.name"),
        localChangesDetector.getRelativeFilePaths()
      );
      return GitUpdateResult.ERROR;
    }
    else {
      LOG.info("handleRebaseFailure error");
      VcsNotifier.getInstance(myProject).notifyError(REBASE_UPDATE_PROJECT_ERROR,
                                                     GitBundle.message("rebase.update.project.notification.failed.title"),
                                                     result.getErrorOutputAsHtmlString(),
                                                     true);
      return GitUpdateResult.ERROR;
    }
  }
public @NotNull GitUpdateResult handleRebaseFailure(@NotNull GitLineHandler handler,
                                                      @NotNull VirtualFile root,
                                                      @NotNull GitCommandResult result,
                                                      @NotNull GitRebaseProblemDetector rebaseConflictDetector,
                                                      @NotNull GitMessageWithFilesDetector untrackedWouldBeOverwrittenDetector,
                                                      @NotNull GitLocalChangesWouldBeOverwrittenDetector localChangesDetector)