git: get cached information about repository to avoid deadlock or freeze when accessing from EDT: IDEA-214543

GitOrigin-RevId: 811f5f83c814996366d32a3a38a6602cd8acb3f3
This commit is contained in:
Kirill Likhodedov
2019-05-23 20:55:50 +03:00
committed by intellij-monorepo-bot
parent 96eee82e5d
commit 90b01d96fc
@@ -581,7 +581,7 @@ public class GitLogProvider implements VcsLogProvider, VcsIndexableLogProvider {
public VirtualFile getVcsRoot(@NotNull Project project, @NotNull FilePath path) {
VirtualFile file = path.getVirtualFile();
if (file != null && file.isDirectory()) {
GitRepository repository = myRepositoryManager.getRepositoryForRoot(file);
GitRepository repository = myRepositoryManager.getRepositoryForRootQuick(file);
if (repository != null) {
GitSubmodule submodule = GitSubmoduleKt.asSubmodule(repository);
if (submodule != null) {