diff options
author | Vicent Martà <vicent@github.com> | 2012-07-21 07:56:59 -0700 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2012-07-21 07:56:59 -0700 |
commit | 5b786963341debf4db7b2984ee4c9bd0c9948764 (patch) | |
tree | be75911fae71ca307bc4028fd05268b24c472d49 /include/git2/object.h | |
parent | 5d9cfa07ac62ad15ebb669b01e723a990450383e (diff) | |
parent | e2c81fca8f41cd8a4f7c908375a738320474fd9d (diff) | |
download | libgit2-5b786963341debf4db7b2984ee4c9bd0c9948764.tar.gz |
Merge pull request #818 from nulltoken/rework
Revparse rework
Diffstat (limited to 'include/git2/object.h')
-rw-r--r-- | include/git2/object.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/git2/object.h b/include/git2/object.h index 414325121..d9e653fd4 100644 --- a/include/git2/object.h +++ b/include/git2/object.h @@ -167,6 +167,23 @@ GIT_EXTERN(int) git_object_typeisloose(git_otype type); */ GIT_EXTERN(size_t) git_object__size(git_otype type); +/** + * Recursively peel an object until an object of the specified + * type is met + * + * The retrieved `peeled` object is owned by the repository + * and should be closed with the `git_object_free` method. + * + * @param peeled Pointer to the peeled git_object + * @param object The object to be processed + * @param target_type The type of the requested object + * @return 0 or an error code + */ +GIT_EXTERN(int) git_object_peel( + git_object **peeled, + git_object *object, + git_otype target_type); + /** @} */ GIT_END_DECL |