Lookup a reference by name and resolve immediately to OID.
The repository in which to look up the reference
The long name for the reference
0 on success, -1 if name could not be resolved