Create a new direct reference from an OID.
the reference name
the object id for a direct reference
the created git_reference or NULL on error