libgit2

git_remote_download

Version:

Download and index the packfile

Connect to the remote if it hasn't been done yet, negotiate with the remote git which objects are missing, download and index the packfile.

The .idx file will be created and both it and the packfile with be renamed to their final name.

Signature

int git_remote_download(git_remote *remote, const git_strarray *refspecs, const git_fetch_options *opts);

Parameters

In
remote

the remote

In
refspecs

the refspecs to use for this negotiation and download. Use NULL or an empty array to use the base refspecs

In
opts

the options to use for this fetch

Returns

int

0 or an error code

Versions