Hide the create branch action if there are no Git repositories

Follow-up to 4724801
This commit is contained in:
Kirill Likhodedov
2017-02-14 17:25:53 +00:00
parent 4f45117015
commit f4e3de89a3
@@ -63,6 +63,7 @@ internal class GitCreateNewBranchAction : DumbAwareAction() {
private fun collectData(e: AnActionEvent): Data {
val project = e.project ?: return Data.Invisible()
val manager = getRepositoryManager(project)
if (manager.repositories.isEmpty()) return Data.Invisible()
val log = e.getData(VcsLogDataKeys.VCS_LOG)
if (log != null) {