diff options
| author | Dmitry Lobanov <gaussblurinc@gmail.com> | 2021-05-26 14:06:31 +0300 |
|---|---|---|
| committer | Dmitry Lobanov <gaussblurinc@gmail.com> | 2021-05-26 14:06:31 +0300 |
| commit | 11aa20b0a28769aef959b1f8665b40aa5daadf0b (patch) | |
| tree | 63d34ce53534604fced1257573f699cdfee464b3 /include/git2 | |
| parent | d6f57b9cfa4006c11ce17be74f3671cf42ea312e (diff) | |
| download | libgit2-11aa20b0a28769aef959b1f8665b40aa5daadf0b.tar.gz | |
submodule: git submodule dup object dup has been added.
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/submodule.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h index 139a0cbc1..e5bd4c7b2 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -224,11 +224,13 @@ GIT_EXTERN(int) git_submodule_lookup( const char *name); /** - * Dup (retain) a submodule + * Create an in-memory copy of a submodule. The copy must be explicitly + * free'd or it will leak. * - * @param submodule Submodule object + * @param out Pointer to store the copy of the submodule + * @param source Original tag to copy */ -GIT_EXTERN(git_submodule *) git_submodule_dup(git_submodule *submodule); +GIT_EXTERN(int) git_submodule_dup(git_submodule **out, git_submodule *source); /** * Release a submodule |
