Create a new object id reference.
The reference will be created in the repository and written to the disk.
This reference is owned by the repository and shall not be free'd by the user.
Pointer to the newly created reference
Repository where that reference will live
The name of the reference
The object id pointed to by the reference.
0 on success; error code otherwise