libgit2

git_remote_download

Version:

Download the packfile

Negotiate what objects should be downloaded and download the packfile with those objects. The packfile is downloaded with a temporary filename, as it's final name is not known yet. If there was no packfile needed (all the objects were available locally), filename will be NULL and the function will return success.

Signature

int git_remote_download(git_remote *remote, git_transfer_progress_callback progress_cb, void *payload);

Parameters

In
remote

the remote to download from

In
progress_cb

function to call with progress information. Be aware that this is called inline with network and indexing operations, so performance may be affected.

void *
In
payload

payload for the progress callback

Returns

int

0 or an error code

Versions