Skip to content

Can't init a repository with a description #466

Closed
@bochecha

Description

@bochecha

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions