Recursively peel reference until object of the specified type is found.
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 a non-tag object is met.
The type of the requested object (GIT_OBJ_COMMIT, GIT_OBJ_TAG, GIT_OBJ_TREE, GIT_OBJ_BLOB or GIT_OBJ_ANY).
0 on success, GIT_EAMBIGUOUS, GIT_ENOTFOUND or an error code