diff options
Diffstat (limited to 'include/git2/tree.h')
-rw-r--r-- | include/git2/tree.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/tree.h b/include/git2/tree.h index f12b15e2e..5c42f3957 100644 --- a/include/git2/tree.h +++ b/include/git2/tree.h @@ -129,6 +129,17 @@ GIT_EXTERN(const git_tree_entry *) git_tree_entry_byname(git_tree *tree, const c GIT_EXTERN(const git_tree_entry *) git_tree_entry_byindex(git_tree *tree, unsigned int idx); /** + * Lookup a tree entry by SHA value. + * + * Warning: this must examine every entry in the tree, so it is not fast. + * + * @param tree a previously loaded tree. + * @param oid the sha being looked for + * @return the tree entry; NULL if not found + */ +GIT_EXTERN(const git_tree_entry *) git_tree_entry_byoid(git_tree *tree, const git_oid *oid); + +/** * Get the UNIX file attributes of a tree entry * * @param entry a tree entry |