private static @NotNull List<CommittedChangeList> trimToSize(@NotNull List<CommittedChangeList> changes, int maxCount) {
    if (maxCount > 0) {
      while (changes.size() > maxCount) {
        changes.remove(0);
      }
    }
    return changes;
  }
private static @NotNull List<CommittedChangeList> trimToSize(@NotNull List<CommittedChangeList> changes, int maxCount)