summaryrefslogtreecommitdiff
path: root/include/git2/tree.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-12-06 13:26:58 -0800
committerRussell Belfer <rb@github.com>2012-12-10 15:38:28 -0800
commit9950d27ab62cc31a3ebf1944fd33dd65432be790 (patch)
treeca7c8efe8b4a5d6e2adc0ae66e26d22a03c76155 /include/git2/tree.h
parent4cbe9a1be18338b7e223b42e6019c58181204123 (diff)
downloadlibgit2-9950d27ab62cc31a3ebf1944fd33dd65432be790.tar.gz
Clean up iterator APIs
This removes the need to explicitly pass the repo into iterators where the repo is implied by the other parameters. This moves the repo to be owned by the parent struct. Also, this has some iterator related updates to the internal diff API to lay the groundwork for checkout improvements.
Diffstat (limited to 'include/git2/tree.h')
-rw-r--r--include/git2/tree.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/git2/tree.h b/include/git2/tree.h
index 2d3534fab..b3c22e71d 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -81,6 +81,14 @@ GIT_INLINE(void) git_tree_free(git_tree *tree)
GIT_EXTERN(const git_oid *) git_tree_id(const git_tree *tree);
/**
+ * Get the repository that contains the tree.
+ *
+ * @param tree A previously loaded tree.
+ * @return Repository that contains this tree.
+ */
+GIT_EXTERN(git_repository *) git_tree_owner(const git_tree *tree);
+
+/**
* Get the number of entries listed in a tree
*
* @param tree a previously loaded tree.