Resolve a symbolic reference
Thie method iteratively peels a symbolic reference until it resolves to a direct reference to an OID.
If a direct reference is passed as an argument, that reference is returned immediately
Pointer to the peeled reference
The reference
GIT_SUCCESS or an error code