mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Hide the create branch action if there are no Git repositories
Follow-up to 4724801
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user