From 49f9941df594136c606bbb9b110869967e0f8e30 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Sun, 16 May 2021 23:54:25 +0300 Subject: submodule: git submodule dup has been added. --- include/git2/submodule.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/git2/submodule.h b/include/git2/submodule.h index bedd76d6a..139a0cbc1 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -223,6 +223,13 @@ GIT_EXTERN(int) git_submodule_lookup( git_repository *repo, const char *name); +/** + * Dup (retain) a submodule + * + * @param submodule Submodule object + */ +GIT_EXTERN(git_submodule *) git_submodule_dup(git_submodule *submodule); + /** * Release a submodule * -- cgit v1.2.1 From 11aa20b0a28769aef959b1f8665b40aa5daadf0b Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Wed, 26 May 2021 14:06:31 +0300 Subject: submodule: git submodule dup object dup has been added. --- include/git2/submodule.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') 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 -- cgit v1.2.1 From ca2ff5abb8d321b185007be11ea1ad8959e9708d Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Tue, 1 Jun 2021 17:52:57 +0300 Subject: submodule: git submodule dup documentation has been fixed. --- include/git2/submodule.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/git2/submodule.h b/include/git2/submodule.h index e5bd4c7b2..857c62f89 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -227,8 +227,8 @@ GIT_EXTERN(int) git_submodule_lookup( * Create an in-memory copy of a submodule. The copy must be explicitly * free'd or it will leak. * - * @param out Pointer to store the copy of the submodule - * @param source Original tag to copy + * @param out Pointer to store the copy of the submodule. Cannot be NULL. + * @param source Original submodule to copy. */ GIT_EXTERN(int) git_submodule_dup(git_submodule **out, git_submodule *source); -- cgit v1.2.1 From 428f1acf97131614d63c23e632ef6ddee7450c51 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Tue, 15 Jun 2021 17:33:03 +0300 Subject: submodule: git submodule dup out and source parameters have become mandatory. --- include/git2/submodule.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/git2/submodule.h b/include/git2/submodule.h index 857c62f89..29d8bc1ce 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -227,7 +227,7 @@ GIT_EXTERN(int) git_submodule_lookup( * Create an in-memory copy of a submodule. The copy must be explicitly * free'd or it will leak. * - * @param out Pointer to store the copy of the submodule. Cannot be NULL. + * @param out Pointer to store the copy of the submodule. * @param source Original submodule to copy. */ GIT_EXTERN(int) git_submodule_dup(git_submodule **out, git_submodule *source); -- cgit v1.2.1