docs: public void cloneTo(File newRepoDir, GitRepositoryFormat format,
                          BiConsumer<Integer, Integer> progressListener) {
  
          requireNonNull(newRepoDir, "newRepoDir");
          requireNonNull(format, "format");
          requireNonNull(progressListener, "progressListener");
  
          final Revision endRevision = normalizeNow(Revision.HEAD);
          final GitRepository newRepo = new GitRepository(parent, newRepoDir, format, repositoryWorker,
                                                          creationTimeMillis(), author(), cache);
  
          progressListener.accept(1, endRevision.major());
          boolean success = false;
          try {
              // Replay all commits.
              Revision previousNonEmptyRevision = null;
              for (int i = 2; i <= endRevision.major();) {
                  // Fetch up to 16 commits at once.
                  final int batch = 16;
                  final List<Commit> commits = blockingHistory(
                          new Revision(i), new Revision(Math.min(endRevision.major(), i + batch - 1)),
                          Repository.ALL_PATH, batch);
                  checkState(!commits.isEmpty(), "empty commits");
  
                  if (previousNonEmptyRevision == null) {
                      previousNonEmptyRevision = commits.get(0).revision().backward(1);
                  }
                  for (Commit c : commits) {
                      final Revision revision = c.revision();
                      checkState(revision.major() == i,
                                 "mismatching revision: %s (expected: %s)", revision.major(), i);
  
                      final Revision baseRevision = revision.backward(1);
                      final Collection<Change<?>> changes =
                              diff(previousNonEmptyRevision, revision, Repository.ALL_PATH).join().values();
  
                      try {
                          newRepo.blockingCommit(
                                  baseRevision, c.when(), c.author(), c.summary(), c.detail(), c.markup(),
                                  changes, /* allowEmptyCommit */ false);
                          previousNonEmptyRevision = revision;
                      } catch (RedundantChangeException e) {
                          // NB: We allow an empty commit here because an old version of Central Dogma had a bug
                          //     which allowed the creation of an empty commit.
                          newRepo.blockingCommit(
                                  baseRevision, c.when(), c.author(), c.summary(), c.detail(), c.markup(),
                                  changes, /* allowEmptyCommit */ true);
                      }
  
                      progressListener.accept(i, endRevision.major());
                      i++;
                  }
              }
  
              success = true;
          } finally {
              newRepo.internalClose();
              if (!success) {
                  deleteCruft(newRepoDir);
              }
          }
      }