Write a new reflog for the given reference
If there is no reflog file for the given reference yet, it will be created.
oid_old may be NULL in case it's a new reference.
oid_old
msg is optional and can be NULL.
msg
the changed reference
the OID the reference was pointing to
the signature of the committer
the reflog message
0 or an error code