libgit2

git_reflog_entry_byindex

Version:

Lookup an entry by its index

Requesting the reflog entry with an index of 0 (zero) will return the most recently created entry.

Signature

const git_reflog_entry *git_reflog_entry_byindex(git_reflog *reflog, size_t idx);

Parameters

In
reflog

a previously loaded reflog

size_t
In
idx

the position of the entry to lookup. Should be greater than or equal to 0 (zero) and less than git_reflog_entrycount().

Returns

the entry; NULL if not found

Versions