code: private void populateComitPerTag(
        final RevCommit from,
        final ObjectId to,
        final Map<String, Ref> tagPerCommitHash,
        final Map<String, String> tagPerCommitsHash,
        final Map<String, Set<GitCommit>> commitsPerTag,
        final Map<String, Date> datePerTag,
        final String startingTagName)
        throws Exception {
      final Set<TraversalWork> moreWork =
          populateCommitPerTag(
              from,
              to,
              commitsPerTag,
              tagPerCommitHash,
              tagPerCommitsHash,
              datePerTag,
              startingTagName);
      do {
        final Set<TraversalWork> evenMoreWork = newTreeSet();
        for (final TraversalWork tw : newArrayList(moreWork)) {
          moreWork.remove(tw);
          final Set<TraversalWork> newWork =
              populateCommitPerTag(
                  from,
                  tw.getTo(),
                  commitsPerTag,
                  tagPerCommitHash,
                  tagPerCommitsHash,
                  datePerTag,
                  tw.getCurrentTagName());
          evenMoreWork.addAll(newWork);
        }
        moreWork.addAll(evenMoreWork);
        LOG.debug("Work left: " + moreWork.size());
      } while (!moreWork.isEmpty());
    }
docs: This can be done recursively but will result in {@link StackOverflowError} for large repos.