git/hook: parse the revision/hash rather than the Oid object

Fixes https://pagure.io/fedora-infrastructure/issue/9016

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2020-06-11 21:13:25 +02:00
parent ab7d661781
commit 18a674d74d

View file

@ -120,7 +120,7 @@ for line in lines:
revs = [head.id]
def _build_commit(rev):
commit = repo.revparse_single(rev)
commit = repo.revparse_single(rev.hex)
# Tags are a little funny, and vary between versions of pygit2, so we'll
# just ignore them as far as fedmsg is concerned.