[Pygit2] Implement get_proper_current_branch