readCurrentBranchName -> readHeadBranchName

* Also return undef if repo is bare