Skip to content

Commit

Permalink
Use the initializer for repository init options
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmn committed Sep 13, 2014
1 parent 63377aa commit 7d34d2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pygit2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def init_repository(path, bare=False,

# Options
options = ffi.new('git_repository_init_options *')
options.version = 1
C.git_repository_init_init_options(options, C.GIT_REPOSITORY_INIT_OPTIONS_VERSION)
options.flags = flags
options.mode = mode
options.workdir_path = to_bytes(workdir_path)
Expand Down
3 changes: 3 additions & 0 deletions pygit2/decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ typedef struct {
const char *origin_url;
} git_repository_init_options;

#define GIT_REPOSITORY_INIT_OPTIONS_VERSION ...
int git_repository_init_init_options(git_repository_init_options *opts, int version);

int git_repository_init(
git_repository **out,
const char *path,
Expand Down

0 comments on commit 7d34d2b

Please sign in to comment.