Get all git repos

Answered

Hello guys I am creating a plugin for IntelliJ and I want to get all the git repos. I have found this function `GitRepositoryManager.getInstance(project).getRepositories()` that works fine but my problem is that sometimes I am getting something back and others I am getting an empty array. I am guessing that the GitRepositoryManager does something async in the background. Is there a Topic that I can subscribe to in order to know that `GitRepositoryManager` has been fully initialized? I have found this `project.getMessageBus().connect().subscribe(GitRepository.GIT_REPO_CHANGE)`  but my problem is that I am getting the repos one by one. I want all of them in order to process them in my plugin

 

 

0

Please sign in to leave a comment.