pygit2 icon indicating copy to clipboard operation
pygit2 copied to clipboard

Can not fetch of HEAD of repository

Open HonakerM opened this issue 1 year ago • 1 comments

Hello, when accessing the .head property of a Repository object I am getting the following error:

    @property
    def head(self) -> str:
        """Get a reference to the current HEAD"""
>       return self.repo.head.target.hex
E       AttributeError: '_pygit2.Oid' object has no attribute 'hex'

This did not happen on 1.14.1

HonakerM avatar May 24 '24 14:05 HonakerM

Oid.hex is among the deprecated features that were removed in 1.15.0. You can use str(oid) instead.

jorio avatar Jun 02 '24 12:06 jorio