gtp: undo command with unit tests