diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2021-07-22 17:07:56 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-22 17:07:56 -0400 |
| commit | 43b5075df4c543fc8801ed4b829702d7f9f2c0ad (patch) | |
| tree | 31ec8b43273ffaed9af2396329b78f6e0deb86b8 /include | |
| parent | c87e4760095ddabab28d90b43d0d30433691e451 (diff) | |
| parent | 54a524524ca1609bcc78f8f60143e0423d5c4344 (diff) | |
| download | libgit2-43b5075df4c543fc8801ed4b829702d7f9f2c0ad.tar.gz | |
Merge pull request #5890 from lolgear/git_submodule_dup
[Submodule] Git submodule dup
Diffstat (limited to 'include')
| -rw-r--r-- | include/git2/submodule.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h index bedd76d6a..29d8bc1ce 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -224,6 +224,15 @@ GIT_EXTERN(int) git_submodule_lookup( const char *name); /** + * 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 submodule to copy. + */ +GIT_EXTERN(int) git_submodule_dup(git_submodule **out, git_submodule *source); + +/** * Release a submodule * * @param submodule Submodule object |
