diff options
author | Vicent Marti <tanoku@gmail.com> | 2013-04-10 16:55:29 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-04-10 16:56:32 +0200 |
commit | 575a54db856947aeb4fc5cf1977844d22dfa1aab (patch) | |
tree | ed78187ff5d5d489888ea0740ec22c1968dbd218 /include/git2/object.h | |
parent | 90431f1b80cc72c6cc4165665c9c46b6292daee5 (diff) | |
download | libgit2-575a54db856947aeb4fc5cf1977844d22dfa1aab.tar.gz |
object: Export git_object_dup
Diffstat (limited to 'include/git2/object.h')
-rw-r--r-- | include/git2/object.h | 9 |
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 |