def GetCurrentBranch():
    'Returns current branch or None.\n\n  For refs/heads/* branches, returns just last part. For others, full ref.\n  '
    branchref = GetCurrentBranchRef()
    if branchref:
        return ShortBranchName(branchref)
    return None
Returns current branch or None.

For refs/heads/* branches, returns just last part. For others, full ref.
def GetCurrentBranch():
    'Returns current branch or None.\n\n  For refs/heads/* branches, returns just last part. For others, full ref.\n  '
    branchref = GetCurrentBranchRef()
    if branchref:
        return ShortBranchName(branchref)
    return None