use of git4idea.util.GitPreservingProcess in project intellij-community by JetBrains.
the class GithubRebaseAction method rebaseCurrentBranch.
private static void rebaseCurrentBranch(@NotNull final Project project, @NotNull final GitRepository gitRepository, @NotNull final ProgressIndicator indicator) {
final Git git = ServiceManager.getService(project, Git.class);
AccessToken token = DvcsUtil.workingTreeChangeStarted(project);
try {
List<VirtualFile> rootsToSave = Collections.singletonList(gitRepository.getRoot());
GitPreservingProcess process = new GitPreservingProcess(project, git, rootsToSave, "Rebasing", "upstream/master", GitVcsSettings.UpdateChangesPolicy.STASH, indicator, () -> {
doRebaseCurrentBranch(project, gitRepository.getRoot(), indicator);
});
process.execute();
} finally {
token.finish();
}
}
Aggregations