Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not fetch of HEAD of repository #1292

Open
HonakerM opened this issue May 24, 2024 · 1 comment
Open

Can not fetch of HEAD of repository #1292

HonakerM opened this issue May 24, 2024 · 1 comment

Comments

@HonakerM
Copy link

HonakerM commented May 24, 2024

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

@jorio
Copy link
Contributor

jorio commented Jun 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants