diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2021-03-10 11:21:39 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-10 11:21:39 +0000 |
| commit | 4f4b1139d23a7b38cceb9d83acbfaf73151f522f (patch) | |
| tree | 99127ebfc5d7dc8a1af9d41d342770409584c410 /include | |
| parent | a0fca809aca16f080b2e7446b2bcba37c52fe27e (diff) | |
| parent | 85af7f21692d92d7bdf18522ad19e2d411d11c5c (diff) | |
| download | libgit2-4f4b1139d23a7b38cceb9d83acbfaf73151f522f.tar.gz | |
Merge pull request #5815 from libgit2/ethomson/treebuilder_write
tree: deprecate `git_treebuilder_write_with_buffer`
Diffstat (limited to 'include')
| -rw-r--r-- | include/git2/deprecated.h | 27 | ||||
| -rw-r--r-- | include/git2/tree.h | 14 |
2 files changed, 27 insertions, 14 deletions
diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h index d18fffc0e..37857f8a2 100644 --- a/include/git2/deprecated.h +++ b/include/git2/deprecated.h @@ -119,6 +119,33 @@ GIT_EXTERN(int) git_blob_filtered_content( /**@}*/ +/** @name Deprecated Tree Functions + * + * These functions are retained for backward compatibility. The + * newer versions of these functions and values should be preferred + * in all new code. + * + * There is no plan to remove these backward compatibility values at + * this time. + */ +/**@{*/ + +/** + * Write the contents of the tree builder as a tree object. + * This is an alias of `git_treebuilder_write` and is preserved + * for backward compatibility. + * + * This function is deprecated, but there is no plan to remove this + * function at this time. + * + * @deprecated Use git_treebuilder_write + * @see git_treebuilder_write + */ +GIT_EXTERN(int) git_treebuilder_write_with_buffer( + git_oid *oid, git_treebuilder *bld, git_buf *tree); + +/**@}*/ + /** @name Deprecated Buffer Functions * * These functions and enumeration values are retained for backward diff --git a/include/git2/tree.h b/include/git2/tree.h index 1a8e155fc..d7545ace9 100644 --- a/include/git2/tree.h +++ b/include/git2/tree.h @@ -378,20 +378,6 @@ GIT_EXTERN(int) git_treebuilder_filter( GIT_EXTERN(int) git_treebuilder_write( git_oid *id, git_treebuilder *bld); -/** - * Write the contents of the tree builder as a tree object - * using a shared git_buf. - * - * @see git_treebuilder_write - * - * @param oid Pointer to store the OID of the newly written tree - * @param bld Tree builder to write - * @param tree Shared buffer for writing the tree. Will be grown as necessary. - * @return 0 or an error code - */ -GIT_EXTERN(int) git_treebuilder_write_with_buffer( - git_oid *oid, git_treebuilder *bld, git_buf *tree); - /** Callback for the tree traversal method */ typedef int GIT_CALLBACK(git_treewalk_cb)( const char *root, const git_tree_entry *entry, void *payload); |
