Lookup a reference to one of the objects in the repostory.
The generated reference is owned by the repository and should not be freed by the user.
The 'type' parameter must match the type of the object in the odb; the method will fail otherwise. The special value 'GIT_OBJ_ANY' may be passed to let the method guess the object's type.
pointer to the looked-up object
the repository to look up the object
the type of the object
a reference to the object