libgit2

git_reflog_append_to

Version:

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.

Signature

int git_reflog_append_to(git_repository *repo, const char *name, const git_oid *id, const git_signature *committer, const char *msg);

Parameters

In
repo

the repository to act on

const char *
In
name

the reflog's name

In
id

the OID the reference is now pointing to

In
committer

the signature of the committer

const char *
In
msg

the reflog message

Returns

int

0 or an error code

Versions