libgit2

git_reference__alloc

Version:

Create a new reference. Either an oid or a symbolic target must be specified.

Signature

git_reference *git_reference__alloc(git_refdb *refdb, const char *name, const git_oid *oid, const char *symbolic);

Parameters

In
refdb

the reference database to associate with this reference

const char *
In
name

the reference name

In
oid

the object id for a direct reference

const char *
In
symbolic

the target for a symbolic reference

Returns

the created git_reference or NULL on error

Versions