Write the index as a tree to the given repository
This method will do the same as git_index_write_tree
, but
letting the user choose the repository where the tree will
be written.
The index must not contain any file in conflict.
0 on success, GIT_EUNMERGED when the index is not clean or an error code