diff options
| author | Russell Belfer <rb@github.com> | 2013-11-04 10:44:59 -0800 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2013-11-04 10:44:59 -0800 |
| commit | fb6b0e019e30a2f9b653e5b1e6b8d5fc1105aee7 (patch) | |
| tree | 47c2d22bddb16b2c0154a8ac13eb1689525a39c5 /include/git2/object.h | |
| parent | a605bbd9b466a4244d695a9f5adff4ce4de6fabd (diff) | |
| parent | 7dcb1c452582d2a83ca1ad8858cb95ab20d6e13d (diff) | |
| download | libgit2-fb6b0e019e30a2f9b653e5b1e6b8d5fc1105aee7.tar.gz | |
Merge pull request #1317 from libgit2/blame
Blame Canada
Diffstat (limited to 'include/git2/object.h')
| -rw-r--r-- | include/git2/object.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/git2/object.h b/include/git2/object.h index f74f3dfd1..c40631fa6 100644 --- a/include/git2/object.h +++ b/include/git2/object.h @@ -78,6 +78,23 @@ GIT_EXTERN(int) git_object_lookup_prefix( size_t len, git_otype type); + +/** + * Lookup an object that represents a tree entry. + * + * @param out buffer that receives a pointer to the object (which must be freed + * by the caller) + * @param treeish root object that can be peeled to a tree + * @param path relative path from the root object to the desired object + * @param type type of object desired + * @return 0 on success, or an error code + */ +GIT_EXTERN(int) git_object_lookup_bypath( + git_object **out, + const git_object *treeish, + const char *path, + git_otype type); + /** * Get the id (SHA1) of a repository object * |
