Allow editing only when worktree is not diverted from head