public NodeId commit(NodeImpl root) {
rootId = addNode(root, false);
if (hash) {
final NodeMap map = this;
root.visit(new ChildVisitor() {
@Override
public void accept(NodeId childId) {
if (childId.isInline()) {
NodeImpl t = childId.getNode(map);
if (hash) {