diff options
| author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2009-02-10 21:49:48 +0000 |
|---|---|---|
| committer | Shawn O. Pearce <spearce@spearce.org> | 2009-02-11 11:04:55 -0800 |
| commit | 82324ac1a5ec79069877ed5d807c87762a16ed9d (patch) | |
| tree | 8ef9060a954118a698fc10e20acdc430566a100f /src/git/odb.h | |
| parent | e9f5e87781e88aa3afa7679783c204604479f9e9 (diff) | |
| download | libgit2-82324ac1a5ec79069877ed5d807c87762a16ed9d.tar.gz | |
Add the git_odb_exists() object query function
This function determines if the given object can be found
in the object database. At present, only the local object
database is searched.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'src/git/odb.h')
| -rw-r--r-- | src/git/odb.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/git/odb.h b/src/git/odb.h index 0a7ee40d3..8a8cd3e5f 100644 --- a/src/git/odb.h +++ b/src/git/odb.h @@ -152,6 +152,17 @@ GIT_EXTERN(int) git_obj__loose_object_type(git_otype type); */ GIT_EXTERN(int) git_obj_hash(git_oid *id, git_obj *obj); +/** + * Determine if the given object can be found in the object database. + * + * @param db database to be searched for the given object. + * @param id the object to search for. + * @return + * - true, if the object was found + * - false, otherwise + */ +GIT_EXTERN(int) git_odb_exists(git_odb *db, const git_oid *id); + /** @} */ GIT_END_DECL #endif |
