libgit2

git_repository_create_cb

Version:

The signature of a function matching git_repository_init, with an additional void * as callback payload.

Callers of git_clone my provide a function matching this signature to override the repository creation and customization process during a clone operation.

Signature

typedef int git_repository_create_cb(git_repository **out, const char *path, int bare, void *payload);

Parameters

In
out

the resulting repository

const char *
In
path

path in which to create the repository

int
In
bare

whether the repository is bare. This is the value from the clone options

void *
In
payload

payload specified by the options

Returns

int

0, or a negative value to indicate error

Versions