Use the initializer for repository init options
This commit is contained in:
@@ -82,7 +82,7 @@ def init_repository(path, bare=False,
|
|||||||
|
|
||||||
# Options
|
# Options
|
||||||
options = ffi.new('git_repository_init_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.flags = flags
|
||||||
options.mode = mode
|
options.mode = mode
|
||||||
options.workdir_path = to_bytes(workdir_path)
|
options.workdir_path = to_bytes(workdir_path)
|
||||||
|
@@ -462,6 +462,9 @@ typedef struct {
|
|||||||
const char *origin_url;
|
const char *origin_url;
|
||||||
} git_repository_init_options;
|
} 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(
|
int git_repository_init(
|
||||||
git_repository **out,
|
git_repository **out,
|
||||||
const char *path,
|
const char *path,
|
||||||
|
Reference in New Issue
Block a user