GitUpdateResult (@NotNull VirtualFile root, @NotNull List<String> parameters) { final GitLineHandler rebaseHandler = new GitLineHandler(myProject, root, GitCommand.REBASE); 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"))) { 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; } }