@Override
  public @Nullable RefreshableOnComponent createCommitOptions(@NotNull CheckinProjectPanel commitPanel, @NotNull CommitContext commitContext) {
    Collection<HgRepository> repos =
      ContainerUtil.map2SetNotNull(commitPanel.getRoots(), getRepositoryManager(myProject)::getRepositoryForFileQuick);
    boolean hasSubrepos = ContainerUtil.exists(repos, HgRepository::hasSubrepos);
    boolean showAmendOption = isAmendCommitOptionSupported(commitPanel, this);

    if (!hasSubrepos && !showAmendOption) return null;

    return new HgCommitAdditionalComponent(commitPanel, commitContext, hasSubrepos, showAmendOption);
  }
@Override
  public @Nullable RefreshableOnComponent createCommitOptions(@NotNull CheckinProjectPanel commitPanel, @NotNull CommitContext commitContext)