libgit2/pygit2

Can't init a repository with a description

bochecha opened this issue · 2 comments

With pygit2 0.21.4:

>>> import pygit2
>>> 
>>> pygit2.init_repository("foo", bare=True)
pygit2.Repository('/home/mathieu/Workspace/palikao/foo/')
>>> 
>>> pygit2.init_repository("bar", bare=True, description="bar")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/pygit2/__init__.py", line 90, in init_repository
    options.description = to_bytes(description)
TypeError: initializer for ctype 'char *' must be a cdata pointer, not str

I get the same problem with both Python2 and Python3.

This should be fixed now PR #471 has been merged. Could you retry?

Sorry for the delay, I confirm #471 fixes this issue. 👍