Sort the entries in a tree created using git_tree_add_entry2.
This does not mark the tree as modified. It is intended to be used after several invocations of git_tree_add_entry2. git_tree_add_entry, on the other hand, sorts after each entry is added.
Tree object whose entries are to be sorted
0 on success; otherwise error code