diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2020-05-29 13:17:39 +0100 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-06-01 22:50:28 +0100 |
| commit | 5eb48a14080fb7392d5ee2482c03d72d1e22448b (patch) | |
| tree | 471e2fd450be526974cd6802e984a9c393b08022 /include/git2/deprecated.h | |
| parent | 51eff5a58b95f91cbdd8e5caa750964c9f08e895 (diff) | |
| download | libgit2-5eb48a14080fb7392d5ee2482c03d72d1e22448b.tar.gz | |
strarray: deprecate git_strarray_copy
We should not be in the business of copying strings around for users.
We either return a strarray that can be freed, or we take one (and do
not mutate it).
Diffstat (limited to 'include/git2/deprecated.h')
| -rw-r--r-- | include/git2/deprecated.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h index 5f020b399..ffef14597 100644 --- a/include/git2/deprecated.h +++ b/include/git2/deprecated.h @@ -535,6 +535,18 @@ typedef int GIT_CALLBACK(git_headlist_cb)(git_remote_head *rhead, void *payload) /**@{*/ /** + * Copy a string array object from source to target. + * + * This function is deprecated, but there is no plan to remove this + * function at this time. + * + * @param tgt target + * @param src source + * @return 0 on success, < 0 on allocation failure + */ +GIT_EXTERN(int) git_strarray_copy(git_strarray *tgt, const git_strarray *src); + +/** * Free the memory referred to by the git_strarray. This is an alias of * `git_strarray_dispose` and is preserved for backward compatibility. * |
