Add -- to rev-parse HEAD to remove ambiguity.