libgit2

git_tree_remove_entry_byindex

Version:

Remove an entry by its index.

Index must be >= 0 and < than git_tree_entrycount().

This will mark the tree as modified; the modified entry will be written back to disk on the next git_object_write()

Signature

int git_tree_remove_entry_byindex(git_tree *tree, int idx);

Parameters

git_tree *
In
tree

Tree where to remove the entry

int
In
idx

index of the entry

Returns

int

0 on successful removal; GIT_ENOTFOUND if the entry wasn't found

Versions