diff options
| author | Ben Straub <bstraub@github.com> | 2012-07-17 08:08:34 -0700 |
|---|---|---|
| committer | Ben Straub <bstraub@github.com> | 2012-07-17 08:08:34 -0700 |
| commit | bfc65634050dc52e3ed6b4497ebbb511e39d6e1e (patch) | |
| tree | 32b03847b8a152b69bc3b48b6bb32e7b8621f45e /include/git2/odb.h | |
| parent | 1d68fcd04b21a2c5665d0ca6a5543e7166c73457 (diff) | |
| parent | ea5d2ce4cfa6cec89e2d844a70d1eb24bb401c7d (diff) | |
| download | libgit2-bfc65634050dc52e3ed6b4497ebbb511e39d6e1e.tar.gz | |
Merge branch 'development' into clone
Diffstat (limited to 'include/git2/odb.h')
| -rw-r--r-- | include/git2/odb.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/git2/odb.h b/include/git2/odb.h index e2443178c..dac9e06a9 100644 --- a/include/git2/odb.h +++ b/include/git2/odb.h @@ -173,6 +173,20 @@ GIT_EXTERN(int) git_odb_read_header(size_t *len_p, git_otype *type_p, git_odb *d GIT_EXTERN(int) git_odb_exists(git_odb *db, const git_oid *id); /** + * 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. + * + * @param db database to use + * @param cb the callback to call for each object + * @param data data to pass to the callback + */ +GIT_EXTERN(int) git_odb_foreach(git_odb *db, int (*cb)(git_oid *oid, void *data), void *data); + +/** * Write an object directly into the ODB * * This method writes a full object straight into the ODB. |
