libgit2

git_tree_entry_byindex

Version:

Lookup a tree entry by its position in the tree

This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.

Signature

const git_tree_entry *git_tree_entry_byindex(git_tree *tree, size_t idx);

Parameters

In
tree

a previously loaded tree.

size_t
In
idx

the position in the entry list

Returns

the tree entry; NULL if not found

Versions