If we move it one step down we might as well skip it because it will `return ref` in both cases then. I've done it in this order to speed up the SHA1 case (which is used for tags) so that it doesn't have to start the `git show-ref` subprocess.

I can remove the check if you want me to do that.