libgit2

git_clone_into

Version:

Clone into a repository

After creating the repository and remote and configuring them for paths and callbacks respectively, you can call this function to perform the clone operation and optionally checkout files.

Signature

int git_clone_into(git_repository *repo, git_remote *remote, const git_checkout_options *co_opts, const char *branch, const git_signature *signature);

Parameters

In
repo

the repository to use

In
remote

the remote repository to clone from

In
co_opts

options to use during checkout

const char *
In
branch

the branch to checkout after the clone, pass NULL for the remote's default branch

In
signature

The identity used when updating the reflog.

Returns

int

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

Versions