libgit2

git_remote_ls

Version:

Get a list of refs at the remote

The remote (or more exactly its transport) must be connected. The memory belongs to the remote.

If you a return a non-zero value from the callback, this will stop looping over the refs.

Signature

int git_remote_ls(git_remote *remote, git_headlist_cb list_cb, void *payload);

Parameters

In
remote

the remote

In
list_cb

function to call with each ref discovered at the remote

void *
In
payload

additional data to pass to the callback

Returns

int

0 on success, GIT_EUSER on non-zero callback, or error code

Versions