use of git4idea.ui.GitResetDialog in project intellij-community by JetBrains.
the class GitResetHead method perform.
/**
* {@inheritDoc}
*/
protected void perform(@NotNull Project project, @NotNull List<VirtualFile> gitRoots, @NotNull VirtualFile defaultRoot) {
GitResetDialog d = new GitResetDialog(project, gitRoots, defaultRoot);
if (!d.showAndGet()) {
return;
}
GitLineHandler h = d.handler();
AccessToken token = DvcsUtil.workingTreeChangeStarted(project);
try {
GitHandlerUtil.doSynchronously(h, GitBundle.getString("resetting.title"), h.printableCommandLine());
} finally {
token.finish();
}
GitRepositoryManager manager = GitUtil.getRepositoryManager(project);
manager.updateRepository(d.getGitRoot());
VfsUtil.markDirtyAndRefresh(true, true, false, d.getGitRoot());
if (!h.errors().isEmpty()) {
showErrors(project, getActionName(), h.errors());
}
}
Aggregations