@Override
  public void update(@NotNull AnActionEvent e) {
    super.update(e);
    Project project = e.getProject();
    Presentation presentation = e.getPresentation();
    if (project != null && !GitUtil.getRepositoriesInStates(project, Repository.State.MERGING).isEmpty()) {
      presentation.setEnabledAndVisible(false);
    }
    else if (project != null && GitUtil.getRepositoriesInStates(project, Repository.State.NORMAL, Repository.State.DETACHED).isEmpty()) {
      presentation.setEnabled(false);
      presentation.setVisible(true);
    }
    else {
      presentation.setEnabledAndVisible(true);
    }
  }
@Override
  public void update(@NotNull AnActionEvent e)