summaryrefslogtreecommitdiff
path: root/include/git2/tree.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-11-17 01:23:19 +0100
committerVicent Marti <tanoku@gmail.com>2011-11-18 01:40:35 +0100
commit9432af36fc62ee22d76fb927b8be73e123ba3f3c (patch)
treeee03ad9725c298bd45642dd500e4589ab9a1ed07 /include/git2/tree.h
parent010879d9e7111d1160839799067584acf09bd4b9 (diff)
downloadlibgit2-9432af36fc62ee22d76fb927b8be73e123ba3f3c.tar.gz
Rename `git_tree_frompath` to `git_tree_get_subtree`
That makes more sense to me.
Diffstat (limited to 'include/git2/tree.h')
-rw-r--r--include/git2/tree.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/git2/tree.h b/include/git2/tree.h
index 68d82351a..2ff167f44 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -269,19 +269,19 @@ GIT_EXTERN(void) git_treebuilder_filter(git_treebuilder *bld, int (*filter)(cons
GIT_EXTERN(int) git_treebuilder_write(git_oid *oid, git_repository *repo, git_treebuilder *bld);
/**
- * Retrieve the tree object containing a tree entry, given
- * a relative path to this tree entry
+ * Retrieve a subtree contained in a tree, given its
+ * relative path.
*
* The returned tree is owned by the repository and
* should be closed with the `git_object_close` method.
*
- * @param parent_out Pointer where to store the parent tree
+ * @param subtree Pointer where to store the subtree
* @param root A previously loaded tree which will be the root of the relative path
- * @param treeentry_path Path to the tree entry from which to extract the last tree object
- * @return GIT_SUCCESS on success; GIT_ENOTFOUND if the path does not lead to an
- * entry, GIT_EINVALIDPATH or an error code
+ * @param subtree_path Path to the contained subtree
+ * @return GIT_SUCCESS on success; GIT_ENOTFOUND if the path does not lead to a
+ * subtree, GIT_EINVALIDPATH or an error code
*/
-GIT_EXTERN(int) git_tree_frompath(git_tree **parent_out, git_tree *root, const char *treeentry_path);
+GIT_EXTERN(int) git_tree_get_subtree(git_tree **subtree, git_tree *root, const char *subtree_path);
/** Callback for the tree traversal method */
typedef int (*git_treewalk_cb)(const char *root, git_tree_entry *entry);