summaryrefslogtreecommitdiff
path: root/include/git2/tree.h
diff options
context:
space:
mode:
authorRomain Geissler <romain.geissler@gmail.com>2011-06-06 17:14:30 +0200
committerRomain Geissler <romain.geissler@gmail.com>2011-06-06 17:14:30 +0200
commitff9a4c130d09629af86a90ac64a89198faf4ffd8 (patch)
tree60f932b356c7c1487cc534d25ac5b89f84f54b74 /include/git2/tree.h
parentf9213015fddb8636daa993080cbbec70a02cba5c (diff)
downloadlibgit2-ff9a4c130d09629af86a90ac64a89198faf4ffd8.tar.gz
Tree: Added a function that returns the type of a tree entry.
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 0caf60a48..7b682b306 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -129,6 +129,14 @@ GIT_EXTERN(const char *) git_tree_entry_name(const git_tree_entry *entry);
GIT_EXTERN(const git_oid *) git_tree_entry_id(const git_tree_entry *entry);
/**
+ * Get the type of the object pointed by the entry
+ *
+ * @param entry a tree entry
+ * @return the type of the pointed object
+ */
+GIT_EXTERN(git_otype) git_tree_entry_type(const git_tree_entry *entry);
+
+/**
* Convert a tree entry to the git_object it points too.
*
* @param object pointer to the converted object