@Override
public NodeState merge() throws CommitFailedException {
NodeState oldRoot = base;
CommitHook commitHook = store.getHook();
NodeState toCommit = commitHook.processCommit(store, oldRoot, currentRoot);
setRoot(toCommit);
try {
if (branchRevision == null) {
// Nothing was written to this branch: return initial node state.