libgit2

git_annotated_commit_from_ref

Version:

Creates a git_annotated_commit from the given reference. The resulting git_annotated_commit must be freed with git_annotated_commit_free.

Signature

int git_annotated_commit_from_ref(git_annotated_commit **out, git_repository *repo, const git_reference *ref);

Parameters

Out
out

pointer to store the git_annotated_commit result in

In
repo

repository that contains the given reference

In
ref

reference to use to lookup the git_annotated_commit

Returns

int

0 on success or error code

Versions