vendor/libgit2/include/git2/tree.h in rugged-0.18.0.gh.de28323 vs vendor/libgit2/include/git2/tree.h in rugged-0.19.0
- old
+ new
@@ -27,37 +27,30 @@
* @param out Pointer to the looked up tree
* @param repo The repo to use when locating the tree.
* @param id Identity of the tree to locate.
* @return 0 or an error code
*/
-GIT_INLINE(int) git_tree_lookup(
- git_tree **out, git_repository *repo, const git_oid *id)
-{
- return git_object_lookup((git_object **)out, repo, id, GIT_OBJ_TREE);
-}
+GIT_EXTERN(int) git_tree_lookup(
+ git_tree **out, git_repository *repo, const git_oid *id);
/**
* Lookup a tree object from the repository,
* given a prefix of its identifier (short id).
*
* @see git_object_lookup_prefix
*
- * @param tree pointer to the looked up tree
+ * @param out pointer to the looked up tree
* @param repo the repo to use when locating the tree.
* @param id identity of the tree to locate.
* @param len the length of the short identifier
* @return 0 or an error code
*/
-GIT_INLINE(int) git_tree_lookup_prefix(
+GIT_EXTERN(int) git_tree_lookup_prefix(
git_tree **out,
git_repository *repo,
const git_oid *id,
- size_t len)
-{
- return git_object_lookup_prefix(
- (git_object **)out, repo, id, len, GIT_OBJ_TREE);
-}
+ size_t len);
/**
* Close an open tree
*
* You can no longer use the git_tree pointer after this call.
@@ -65,14 +58,11 @@
* IMPORTANT: You MUST call this method when you stop using a tree to
* release memory. Failure to do so will cause a memory leak.
*
* @param tree The tree to close
*/
-GIT_INLINE(void) git_tree_free(git_tree *tree)
-{
- git_object_free((git_object *)tree);
-}
+GIT_EXTERN(void) git_tree_free(git_tree *tree);
/**
* Get the id of a tree.
*
* @param tree a previously loaded tree.
@@ -105,11 +95,11 @@
* @param tree a previously loaded tree.
* @param filename the filename of the desired entry
* @return the tree entry; NULL if not found
*/
GIT_EXTERN(const git_tree_entry *) git_tree_entry_byname(
- git_tree *tree, const char *filename);
+ const git_tree *tree, const char *filename);
/**
* Lookup a tree entry by its position in the tree
*
* This returns a git_tree_entry that is owned by the git_tree. You don't
@@ -118,11 +108,11 @@
* @param tree a previously loaded tree.
* @param idx the position in the entry list
* @return the tree entry; NULL if not found
*/
GIT_EXTERN(const git_tree_entry *) git_tree_entry_byindex(
- git_tree *tree, size_t idx);
+ const git_tree *tree, size_t idx);
/**
* Lookup a tree entry by SHA value.
*
* This returns a git_tree_entry that is owned by the git_tree. You don't
@@ -144,16 +134,16 @@
* Unlike the other lookup functions, the returned tree entry is owned by
* the user and must be freed explicitly with `git_tree_entry_free()`.
*
* @param out Pointer where to store the tree entry
* @param root Previously loaded tree which is the root of the relative path
- * @param subtree_path Path to the contained entry
+ * @param path Path to the contained entry
* @return 0 on success; GIT_ENOTFOUND if the path does not exist
*/
GIT_EXTERN(int) git_tree_entry_bypath(
git_tree_entry **out,
- git_tree *root,
+ const git_tree *root,
const char *path);
/**
* Duplicate a tree entry
*
@@ -220,11 +210,11 @@
/**
* Convert a tree entry to the git_object it points too.
*
* You must call `git_object_free()` on the object when you are done with it.
*
- * @param object pointer to the converted object
+ * @param object_out pointer to the converted object
* @param repo repository where to lookup the pointed object
* @param entry a tree entry
* @return 0 or an error code
*/
GIT_EXTERN(int) git_tree_entry_to_object(
@@ -259,10 +249,10 @@
GIT_EXTERN(void) git_treebuilder_clear(git_treebuilder *bld);
/**
* Get the number of entries listed in a treebuilder
*
- * @param tree a previously loaded treebuilder.
+ * @param bld a previously loaded treebuilder.
* @return the number of entries in the treebuilder
*/
GIT_EXTERN(unsigned int) git_treebuilder_entrycount(git_treebuilder *bld);
/**