def __eq__(self, other):
        return (isinstance(other, self.__class__) and
                other.package == self.package)
def mkhead(repo: 'Repo', path: PathLike) -> 'Head':
    """:return: New branch/head instance"""
    return git.Head(repo, git.Head.to_full_path(path))