Add a new entry to a tree and return the new entry.
This will mark the tree as modified; the new entry will be written back to disk on the next git_object_write()
Pointer to the entry that just got created. May be NULL if you are not interested on getting the new entry
Tree object to store the entry \iparam id OID for the tree entry
Filename for the tree entry
UNIX file attributes for the entry
0 on success; otherwise error code