summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-01-03 11:28:26 +0000
committerGitHub <noreply@github.com>2018-01-03 11:28:26 +0000
commit4964aea07e22318bdcda1e30d1b6a6deecfc12da (patch)
tree6bb9d55012335201239b14ae4bd04c7d3475c4ab
parent98303ea357fe609135cb0ebabd0270a596601d83 (diff)
parent346c1b169d0c15adeef496e24db6ac9801b4283d (diff)
downloadlibgit2-4964aea07e22318bdcda1e30d1b6a6deecfc12da.tar.gz
Merge pull request #4456 from libgit2/ethomson/treebuilder_docs
docs: git_treebuilder_insert validates entries
-rw-r--r--include/git2/tree.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/git2/tree.h b/include/git2/tree.h
index 4740b1ffa..1a363c149 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -307,9 +307,10 @@ GIT_EXTERN(const git_tree_entry *) git_treebuilder_get(
* pointer may not be valid past the next operation in this
* builder. Duplicate the entry if you want to keep it.
*
- * No attempt is being made to ensure that the provided oid points
- * to an existing git object in the object database, nor that the
- * attributes make sense regarding the type of the pointed at object.
+ * By default the entry that you are inserting will be checked for
+ * validity; that it exists in the object database and is of the
+ * correct type. If you do not want this behavior, set the
+ * `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` library option to false.
*
* @param out Pointer to store the entry (optional)
* @param bld Tree builder