diff options
author | Russell Belfer <rb@github.com> | 2012-12-06 13:26:58 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-12-10 15:38:28 -0800 |
commit | 9950d27ab62cc31a3ebf1944fd33dd65432be790 (patch) | |
tree | ca7c8efe8b4a5d6e2adc0ae66e26d22a03c76155 /src/tree.c | |
parent | 4cbe9a1be18338b7e223b42e6019c58181204123 (diff) | |
download | libgit2-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 'src/tree.c')
-rw-r--r-- | src/tree.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tree.c b/src/tree.c index efb991df1..944992fea 100644 --- a/src/tree.c +++ b/src/tree.c @@ -207,9 +207,14 @@ void git_tree__free(git_tree *tree) git__free(tree); } -const git_oid *git_tree_id(const git_tree *c) +const git_oid *git_tree_id(const git_tree *t) { - return git_object_id((const git_object *)c); + return git_object_id((const git_object *)t); +} + +git_repository *git_tree_owner(const git_tree *t) +{ + return git_object_owner((const git_object *)t); } git_filemode_t git_tree_entry_filemode(const git_tree_entry *entry) |