libgit2

git_tree_entry_dup

Version:

Duplicate a tree entry

Create a copy of a tree entry. The returned copy is owned by the user, and must be freed explicitly with git_tree_entry_free().

Signature

git_tree_entry *git_tree_entry_dup(const git_tree_entry *entry);

Parameters

In
entry

A tree entry to duplicate

Returns

a copy of the original entry or NULL on error (alloc failure)

Versions