summaryrefslogtreecommitdiff
path: root/src/git/tree.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2010-07-10 16:51:15 -0700
committerVicent Marti <tanoku@gmail.com>2010-07-15 23:41:49 +0200
commitd8603ed901d4af4d0d2b493d1164c74eae34f147 (patch)
tree12b66564dafa01d8a13b8ecf53474b1d305ea771 /src/git/tree.h
parent3e590fb2221ea3c117b7347956843d24132ac22b (diff)
downloadlibgit2-d8603ed901d4af4d0d2b493d1164c74eae34f147.tar.gz
Add parsing of tree file contents.
The basic information (pointed trees and blobs) of each tree object in a revision pool can now be parsed and queried. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/git/tree.h')
-rw-r--r--src/git/tree.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/git/tree.h b/src/git/tree.h
index d5f668c54..9a4973ba6 100644
--- a/src/git/tree.h
+++ b/src/git/tree.h
@@ -28,6 +28,18 @@ typedef struct git_tree git_tree;
GIT_EXTERN(git_tree *) git_tree_lookup(git_revpool *pool, const git_oid *id);
/**
+ * Locate a reference to a tree object and parse its
+ * contents.
+ * The generated tree object is owned by the revision
+ * pool and shall not be freed by the user.
+ *
+ * @param pool the pool to use when locating the tree.
+ * @param id identity of the tree to locate.
+ * @return the tree; NULL if the tree could not be created
+ */
+GIT_EXTERN(git_tree *) git_tree_parse(git_revpool *pool, const git_oid *id);
+
+/**
* Get the id of a tree.
* @param tree a previously loaded tree.
* @return object identity for the tree.