private static String trimCommentIfNeeded(@NotNull String line, @NotNull String commentChar) {
    // Ex: 'f efefef subject # empty' for commits created with '--allow-empty'
    int i = line.indexOf(commentChar);
    if (i == -1) return line;
    return line.substring(0, i).trim();
  }
private static String trimCommentIfNeeded(@NotNull String line, @NotNull String commentChar)