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.
msg is optional and can be NULL.
the reflog message
GIT_SUCCESS or an error code