def deref_tag(tag):
    while True:
        try:
            tag = tag.object
        except AttributeError:
            break
    # END dereference tag
    return tag
Recursively dereference a tag and return the resulting object
dataset/ETHPy150Open gitpython-developers/GitPython/git/repo/fun.py/deref_tag