libgit2

git_odb_foreach

Version:

List all objects available in the database

The callback will be called for each object available in the database. Note that the objects are likely to be returned in the index order, which would make accessing the objects in that order inefficient. Return a non-zero value from the callback to stop looping.

Signature

int git_odb_foreach(git_odb *db, git_odb_foreach_cb cb, void *payload);

Parameters

In
db

database to use

In
cb

the callback to call for each object

void *
In
payload

data to pass to the callback

Returns

int

0 on success, non-zero callback return value, or error code

Versions