libgit2

git_tree_lookup

Version:

Lookup a tree object from the repository. The generated tree object is owned by the revision repo and shall not be freed by the user.

Signature

int git_tree_lookup(git_tree **tree, git_repository *repo, const git_oid *id);

Parameters

git_tree **
In
tree

pointer to the looked up tree

git_repository *
In
repo

the repo to use when locating the tree.

const git_oid *
In
id

identity of the tree to locate.

Returns

int

0 on success; error code otherwise

Versions