libgit2

git_annotated_commit_from_revspec

Version:

Creates a git_annotated_commit from a revision string.

See man gitrevisions, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.

Signature

int git_annotated_commit_from_revspec(git_annotated_commit **out, git_repository *repo, const char *revspec);

Parameters

Out
out

pointer to store the git_annotated_commit result in

In
repo

repository that contains the given commit

const char *
In
revspec

the extended sha syntax string to use to lookup the commit

Returns

int

0 on success or error code

Versions