libgit2

git_reflog_write

Version:

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.

Signature

int git_reflog_write(git_reference *ref, const git_oid *oid_old, const git_signature *committer, const char *msg);

Parameters

In
ref

the changed reference

In
oid_old

the OID the reference was pointing to

In
committer

the signature of the committer

const char *
In
msg

the reflog message

Returns

int

GIT_SUCCESS on success; error code otherwise

Versions