summaryrefslogtreecommitdiff
path: root/include/git2/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/tree.h')
-rw-r--r--include/git2/tree.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/git2/tree.h b/include/git2/tree.h
index 550a44857..8a2be2102 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -409,6 +409,15 @@ GIT_EXTERN(int) git_tree_walk(
git_treewalk_cb callback,
void *payload);
+/**
+ * Create an in-memory copy of a tree. The copy must be explicitly
+ * free'd or it will leak.
+ *
+ * @param out Pointer to store the copy of the tree
+ * @param source Original tree to copy
+ */
+GIT_EXTERN(int) git_tree_dup(git_tree **out, git_tree *source);
+
/** @} */
GIT_END_DECL