summaryrefslogtreecommitdiff
path: root/include/git2/object.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/object.h')
-rw-r--r--include/git2/object.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/git2/object.h b/include/git2/object.h
index e029f0125..b91b04dba 100644
--- a/include/git2/object.h
+++ b/include/git2/object.h
@@ -188,6 +188,15 @@ GIT_EXTERN(int) git_object_peel(
const git_object *object,
git_otype target_type);
+/**
+ * Create an in-memory copy of a Git object. The copy must be
+ * explicitly free'd or it will leak.
+ *
+ * @param dest Pointer to store the copy of the object
+ * @param source Original object to copy
+ */
+GIT_EXTERN(int) git_object_dup(git_object **dest, git_object *source);
+
/** @} */
GIT_END_DECL