libgit2

git_object_lookup_bypath

Version:

Lookup an object that represents a tree entry.

Signature

int git_object_lookup_bypath(git_object **out, const git_object *treeish, const char *path, git_otype type);

Parameters

In
out

buffer that receives a pointer to the object (which must be freed by the caller)

In
treeish

root object that can be peeled to a tree

const char *
In
path

relative path from the root object to the desired object

In
type

type of object desired

Returns

int

0 on success, or an error code

Versions