Lookup a reference to one of the objects in a repository.
The generated reference is owned by the repository and
should be closed with the git_object_free method
instead of free'd manually.
The 'type' parameter must match the type of the object
in the odb; the method will fail otherwise.
The special value 'git_object_t.GIT_OBJECT_ANY' may be passed to let
the method guess the object's type.
@param object pointer to the looked-up object
@param repo the repository to look up the object
@param id the unique identifier for the object
@param type the type of the object
@return 0 or an error code
Lookup a reference to one of the objects in a repository.
The generated reference is owned by the repository and should be closed with the git_object_free method instead of free'd manually.
The 'type' parameter must match the type of the object in the odb; the method will fail otherwise. The special value 'git_object_t.GIT_OBJECT_ANY' may be passed to let the method guess the object's type.
@param object pointer to the looked-up object @param repo the repository to look up the object @param id the unique identifier for the object @param type the type of the object @return 0 or an error code