headClone = headCloneSupplier.get();
archiveLocation = headClone.archiveAtRevision(rev.revId);
} else {
// TODO(user): Archive only (don't clone) if localroot is set.
headClone = cloneAtLocalRoot(localRoot);
archiveLocation = headClone.archiveAtRevision(null);
}
// Filter files in the codebase by RepositoryConfig#ignoreFileRes.
Predicate<CharSequence> nonIgnoredFilePred =
Utils.nonMatchingPredicateFromRes(headClone.getConfig().getIgnoreFileRes());