libgit2

git_repository_fetchhead_foreach

Version:

Invoke 'callback' for each entry in the given FETCH_HEAD file.

Return a non-zero value from the callback to stop the loop.

Signature

int git_repository_fetchhead_foreach(git_repository *repo, git_repository_fetchhead_foreach_cb callback, void *payload);

Parameters

In
repo

A repository object

In
callback

Callback function

void *
In
payload

Pointer to callback data (optional)

Returns

int

0 on success, non-zero callback return value, GIT_ENOTFOUND if there is no FETCH_HEAD file, or other error code.

Versions