Map<String, ObjectId> metadataCache, RevTree stageHead) {
if (NodeRef.ROOT.equals(parentPath)) {
return;
}
NodeRef indexTreeRef = indexChangedTrees.get(parentPath);
if (indexTreeRef == null) {
Optional<NodeRef> treeRef = Optional.absent();
if (!stageHead.isEmpty()) {// slight optimization, may save a lot of processing on
// large first commits
treeRef = command(FindTreeChild.class).setIndex(true).setParent(stageHead)
.setChildPath(parentPath).call();
}
if (treeRef.isPresent()) {// may not be in case of a delete
indexTreeRef = treeRef.get();
indexChangedTrees.put(parentPath, indexTreeRef);
metadataCache.put(parentPath, indexTreeRef.getMetadataId());
}
} else {
metadataCache.put(parentPath, indexTreeRef.getMetadataId());
}
}