diff options
| author | Vicent Martà <vicent@github.com> | 2012-08-27 14:52:26 -0700 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2012-08-27 14:52:26 -0700 |
| commit | bd2887a5e5d823b2fc9debef245bcd865ba3dd83 (patch) | |
| tree | c28978d57970ee13fc53f4eb87aae3d40bf9fdb7 /include/git2 | |
| parent | b9d283d14aac37ed6b4e83aed2c17e0e7040d677 (diff) | |
| parent | d8057a5b0ed644b1f72a4eb80f82da7ce8977958 (diff) | |
| download | libgit2-bd2887a5e5d823b2fc9debef245bcd865ba3dd83.tar.gz | |
Merge pull request #904 from arrbee/better-object-peel
Make git_object_peel a bit smarter
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/object.h | 11 | ||||
| -rw-r--r-- | include/git2/reset.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/include/git2/object.h b/include/git2/object.h index 722434dec..fd6ae95c1 100644 --- a/include/git2/object.h +++ b/include/git2/object.h @@ -168,11 +168,14 @@ 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 + * 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. + * The retrieved `peeled` object is owned by the repository and should be + * closed with the `git_object_free` method. + * + * If you pass `GIT_OBJ_ANY` as the target type, then the object will be + * peeled until the type changes (e.g. a tag will be chased until the + * referenced object is no longer a tag). * * @param peeled Pointer to the peeled git_object * @param object The object to be processed diff --git a/include/git2/reset.h b/include/git2/reset.h index 125178748..cd263fa99 100644 --- a/include/git2/reset.h +++ b/include/git2/reset.h @@ -37,7 +37,7 @@ GIT_BEGIN_DECL * * @return GIT_SUCCESS or an error code */ -GIT_EXTERN(int) git_reset(git_repository *repo, const git_object *target, git_reset_type reset_type); +GIT_EXTERN(int) git_reset(git_repository *repo, git_object *target, git_reset_type reset_type); /** @} */ GIT_END_DECL |
