summaryrefslogtreecommitdiff
path: root/include/git2/deprecated.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-05-29 13:17:39 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2020-06-01 22:50:28 +0100
commit5eb48a14080fb7392d5ee2482c03d72d1e22448b (patch)
tree471e2fd450be526974cd6802e984a9c393b08022 /include/git2/deprecated.h
parent51eff5a58b95f91cbdd8e5caa750964c9f08e895 (diff)
downloadlibgit2-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.h12
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.
*