improved performance of vcs_info#get_branch()