libgit2

git_tree_lookup_prefix

Version:

Lookup a tree object from the repository, given a prefix of its identifier (short id).

See

Signature

int git_tree_lookup_prefix(git_tree **tree, git_repository *repo, const git_oid *id, unsigned int len);

Parameters

In
tree

pointer to the looked up tree

In
repo

the repo to use when locating the tree.

In
id

identity of the tree to locate.

unsigned int
In
len

the length of the short identifier

Returns

int

0 on success; error code otherwise

Versions