git/hook: apparently the rev can be either a string or the pygit2.Oid object
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
4614a6ebf2
commit
b631c49d08
1 changed files with 4 additions and 1 deletions
|
@ -120,7 +120,10 @@ for line in lines:
|
|||
revs = [head.id]
|
||||
|
||||
def _build_commit(rev):
|
||||
commit = repo.revparse_single(rev.hex)
|
||||
if instance(rev, str):
|
||||
commit = repo.revparse_single(rev)
|
||||
else:
|
||||
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue