@classmethod
    def from_string(cls, repo, line):
        full_name, ids = line.split("\x00")

        if full_name.startswith('refs/heads/'):
            name = full_name[len('refs/heads/'):]
        else:
            name = full_name

        c = commit.Commit(repo, id=ids)
        return Head(name, c)
Create a new Head instance from the given string.
dataset/ETHPy150Open kergoth/git-origin/git-python/lib/git/head.py/Head.from_string