It's a tiny optimisation to skip HEAD if we've already seen it. With the new code, it'll just fail to match. An edge case would be handling a `HEAD:HEAD` refspec (which git will store as `refs/heads/HEAD`) but it's not really in the scope of this PR.