Add a new entry to the named reflog.
This utility function loads the named reflog, appends to it and writes it back out to the backend.
msg is optional and can be NULL.
msg
the repository to act on
the reflog's name
the OID the reference is now pointing to
the signature of the committer
the reflog message
0 or an error code