rev-parse: fix meaning of rev~ vs rev~0.