Skip to content

Fix data type of options in init_repository() - #471

Merged
jdavid merged 1 commit into
libgit2:masterfrom
lfos:fix-init_repository-opts
Jan 11, 2015
Merged

jdavid merged 1 commit into
libgit2:masterfrom
lfos:fix-init_repository-opts

Conversation

@lfos

@lfos lfos commented Jan 10, 2015

Copy link
Copy Markdown
Contributor

This fixes errors such as the following which occur when using any of the optional string parameters of init_repository():

Traceback (most recent call last):
  [...]
    pygit2.init_repository(repo_path, True, template_path=template_path)
  File "/usr/lib/python3.4/site-packages/pygit2/__init__.py", line 89, in init_repository
    options.template_path = to_str(template_path)
TypeError: initializer for ctype 'char *' must be a cdata pointer, not bytes
Initializers for the char * fields of the git_repository_init_options
structure must be cdata pointers.

Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
@jdavid
jdavid merged commit 4cbfade into libgit2:master Jan 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants