// use a shortcut when there are no external changes
builder.setChildNode(
ROOT, hook.processCommit(before, after, info));
} else {
// there were some external changes, so do the full rebase
ConflictAnnotatingRebaseDiff diff =
new ConflictAnnotatingRebaseDiff(builder.child(ROOT));
after.compareAgainstBaseState(before, diff);
// apply commit hooks on the rebased changes
builder.setChildNode(ROOT, hook.processCommit(
builder.getBaseState().getChildNode(ROOT),
builder.getNodeState().getChildNode(ROOT),