Skip to content

Can't init a repository with a description #466

Closed

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.

Activity

  1. jdavid commented on Jan 14, 2015

    @jdavid
    Member

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

  2. bochecha commented on Jan 16, 2015

    @bochecha
    ContributorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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