libgit2

git_reference_resolve

Version:

Resolve a symbolic reference

Thie method iteratively peels a symbolic reference until it resolves to a direct reference to an OID.

If a direct reference is passed as an argument, that reference is returned immediately

Signature

int git_reference_resolve(git_reference **resolved_ref, git_reference *ref);

Parameters

In
resolved_ref

Pointer to the peeled reference

In
ref

The reference

Returns

int

0 on success; error code otherwise

Versions