libgit2

git_reference__alloc

Version:

Create a new direct reference from an OID.

Signature

git_reference *git_reference__alloc(const char *name, const git_oid *oid, const git_oid *peel);

Parameters

const char *
In
name

the reference name

In
oid

the object id for a direct reference

In
peel

the first non-tag object's OID, or NULL

Returns

the created git_reference or NULL on error

Versions