summaryrefslogtreecommitdiff
path: root/include/git2/object.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-04-10 16:55:29 +0200
committerVicent Marti <tanoku@gmail.com>2013-04-10 16:56:32 +0200
commit575a54db856947aeb4fc5cf1977844d22dfa1aab (patch)
treeed78187ff5d5d489888ea0740ec22c1968dbd218 /include/git2/object.h
parent90431f1b80cc72c6cc4165665c9c46b6292daee5 (diff)
downloadlibgit2-575a54db856947aeb4fc5cf1977844d22dfa1aab.tar.gz
object: Export git_object_dup
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