mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
npe
This commit is contained in:
@@ -100,8 +100,9 @@ public class GitRepositoryManagerImpl extends AbstractProjectComponent implement
|
||||
public GitRepository getRepositoryForFile(@NotNull VirtualFile file) {
|
||||
final VcsRoot vcsRoot = myVcsManager.getVcsRootObjectFor(file);
|
||||
if (vcsRoot == null) { return null; }
|
||||
if (!myVcs.equals(vcsRoot.vcs)) {
|
||||
LOG.info(String.format("getRepositoryForFile returned non-Git (%s) root for file %s", vcsRoot.vcs.getDisplayName(), file));
|
||||
final AbstractVcs vcs = vcsRoot.vcs;
|
||||
if (!myVcs.equals(vcs)) {
|
||||
LOG.info(String.format("getRepositoryForFile returned non-Git (%s) root for file %s", vcs != null ? vcs.getDisplayName() : vcs, file));
|
||||
return null;
|
||||
}
|
||||
return getRepositoryForRoot(vcsRoot.path);
|
||||
|
||||
Reference in New Issue
Block a user