@Override
  public boolean hasNext() {
    if (!repositoryCommits.isEmpty()) {
      if (currentPosition < repositoryCommits.size()) return true;
      if (fetchedCount >= MAX_FETCH_SIZE) {
        LOG.info("Exceeded fetch limit for git commits");
        return false;
      }
      fetchOldCommits(repositoryCommits.get(currentPosition - 1));
      if (!repositoryCommits.isEmpty()) {
        currentPosition = 0;
        return true;
      }
    }
    return false;
  }
@Override
  public boolean hasNext()