git_clone

Clone a remote repository.

By default this creates its repository and initial remote to match git's defaults. You can use the options in the callback to customize how these are created.

extern (C) nothrow @nogc
int
git_clone

Parameters

out_ libgit2_d.types.git_repository**

pointer that will receive the resulting repository object

url const(char)*

the remote repository to clone

local_path const(char)*

local directory to clone to

options const(.git_clone_options)*

configuration options for the clone. If null, the function works as though GIT_OPTIONS_INIT were passed.

Return Value

Type: int

0 on success, any non-zero return value from a callback function, or a negative value to indicate an error (use git_error_last for a detailed error message)

Meta