protected static @NotNull <T> String getCommitPresentation(@NotNull T commitId) {
    if (commitId instanceof Hash) {
      return VcsLogBundle.message("vcs.log.commit.prefix", ((Hash)commitId).toShortString());
    }
    if (commitId instanceof String commitString) {
      if (VcsLogUtil.HASH_PREFIX_REGEX.matcher(commitString).matches()) {
        return VcsLogBundle.message("vcs.log.commit.or.reference.prefix", VcsLogUtil.getShortHash(commitString));
      }
    }
    return VcsLogBundle.message("vcs.log.commit.or.reference.prefix", commitId.toString());
  }
protected static @NotNull <T> String getCommitPresentation(@NotNull T commitId)