void (@NotNull GitRepository repository, @NotNull String oldName, @NotNull String newName) { ApplicationManager.getApplication().invokeLater(() -> { if (myProject.isDisposed()) return; myProject.getMessageBus().syncPublisher(BranchRenameListener.VCS_BRANCH_RENAMED) .branchNameChanged(repository.getRoot(), oldName, newName); }); }