libgit2

git_reference_dup

Version:

Create a copy of an existing reference.

Call git_reference_free to free the data.

Signature

int git_reference_dup(git_reference **dest, git_reference *source);

Parameters

In
dest

pointer where to store the copy

In
source

object to copy

Returns

int

0 or an error code

Versions