mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Don't fail while creating GitRepository.
If an exception happens during GitRepository creation from GitRepositoryManager#updateRepositoriesCollection(), just log the error and go further. Otherwise the repository wouldn't be detected ever unless another updateRepositoriesCollection() is called.
This commit is contained in:
@@ -157,8 +157,13 @@ public class GitRepositoryManagerImpl extends AbstractProjectComponent implement
|
||||
for (VirtualFile root : roots) {
|
||||
if (!myRepositories.containsKey(root)) {
|
||||
if (gitRootOK(root)) {
|
||||
GitRepository repository = createGitRepository(root);
|
||||
myRepositories.put(root, repository);
|
||||
try {
|
||||
GitRepository repository = createGitRepository(root);
|
||||
myRepositories.put(root, repository);
|
||||
}
|
||||
catch (GitRepoStateException e) {
|
||||
LOG.error("Couldn't initialize GitRepository in " + root.getPresentableUrl(), e);
|
||||
}
|
||||
}
|
||||
else {
|
||||
LOG.info("Invalid Git root: " + root);
|
||||
|
||||
Reference in New Issue
Block a user