rev-parse: exit with non-zero status if ref@{n} is not valid.