checkArgument(builder instanceof SegmentNodeBuilder);
NodeState oldBase = builder.getBaseState();
if (!SegmentNodeState.fastEquals(oldBase, newBase)) {
NodeState head = builder.getNodeState();
((SegmentNodeBuilder) builder).reset(newBase);
head.compareAgainstBaseState(oldBase, new ConflictAnnotatingRebaseDiff(builder));
}
return builder.getNodeState();
}