proper implementation of git_current_branch