libgit2

git_remote_fetch

Version:

Download new data and update tips

Convenience function to connect to a remote, download the data, disconnect and update the remote-tracking branches.

Signature

int git_remote_fetch(git_remote *remote, const git_strarray *refspecs, const git_signature *signature, const char *reflog_message);

Parameters

In
remote

the remote to fetch from

In
refspecs

the refspecs to use for this fetch. Pass NULL or an empty array to use the base refspecs.

In
signature

The identity to use when updating reflogs

const char *
In
reflog_message

The message to insert into the reflogs. If NULL, the default is "fetch"

Returns

int

0 or an error code

Versions