libgit2

git_remote_ls

Version:

Get the remote repository's reference advertisement list

Get the list of references with which the server responds to a new connection.

The remote (or more exactly its transport) must have connected to the remote repository. This list is available as soon as the connection to the remote is initiated and it remains available after disconnecting.

The memory belongs to the remote. The pointer will be valid as long as a new connection is not initiated, but it is recommended that you make a copy in order to make use of the data.

Signature

int git_remote_ls(const git_remote_head ***out, size_t *size, git_remote *remote);

Parameters

In
out

pointer to the array

size_t *
In
size

the number of remote heads

In
remote

the remote

Returns

int

0 on success, or an error code

Versions