summaryrefslogtreecommitdiff
path: root/src/git/tree.h
diff options
context:
space:
mode:
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.