git-symbolic-ref outputs refs/heads/master in those cases, even if master branch does not really exists.