diff options
author | Edward Thomson <ethomson@github.com> | 2016-02-17 18:04:19 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@github.com> | 2016-03-23 17:08:37 -0400 |
commit | f0224772ee4300d55e11ab6f84cb3dd64b35ecfd (patch) | |
tree | 5f4857f12f0268973f8d4a758043413f4b164f0d /include/git2/commit.h | |
parent | 684b35c41b9166645e2edb9bc708aa7ddf9c1f24 (diff) | |
download | libgit2-f0224772ee4300d55e11ab6f84cb3dd64b35ecfd.tar.gz |
git_object_dup: introduce typesafe versions
Diffstat (limited to 'include/git2/commit.h')
-rw-r--r-- | include/git2/commit.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/git2/commit.h b/include/git2/commit.h index f63a90685..4cc637466 100644 --- a/include/git2/commit.h +++ b/include/git2/commit.h @@ -461,6 +461,15 @@ GIT_EXTERN(int) git_commit_create_with_signature( const char *signature, const char *signature_field); +/** + * Create an in-memory copy of a commit. The copy must be explicitly + * free'd or it will leak. + * + * @param out Pointer to store the copy of the commit + * @param source Original commit to copy + */ +GIT_EXTERN(int) git_commit_dup(git_commit **out, git_commit *source); + /** @} */ GIT_END_DECL #endif |