public void call(PreOrderDiffWalk.Consumer consumer) { checkArgument(oldRefSpec != null || oldTreeId != null || oldTree != null, "old version not specified"); checkArgument(newRefSpec != null || oldTreeId != null || newTree != null, "new version not specified"); final ObjectStore leftSource; final ObjectStore rightSource; leftSource = this.leftSource == null ? objectDatabase() : this.leftSource; rightSource = this.rightSource == null ? objectDatabase() : this.rightSource; final RevTree oldTree = resolveTree(oldRefSpec, this.oldTreeId, this.oldTree, leftSource); final RevTree newTree = resolveTree(newRefSpec, this.newTreeId, this.newTree, rightSource); final PreOrderDiffWalk visitor = new PreOrderDiffWalk(oldTree, newTree, leftSource, rightSource, preserveIterationOrder); visitor.setDefaultMetadataId(this.metadataId); visitor.walk(consumer); }