Using rev-parse to determine branch name of HEAD for on_branch? method