Avoid allowing --undo if it doesn't change anything