libgit2

git_reference_name_to_oid

Version:

Lookup a reference by name and resolve immediately to OID.

Signature

int git_reference_name_to_oid(git_oid *out, git_repository *repo, const char *name);

Parameters

In
out
In
repo

The repository in which to look up the reference

const char *
In
name

The long name for the reference

Returns

int

0 on success, -1 if name could not be resolved

Versions