Write the contents of the tree builder as a tree object
The tree builder will be written to the given repo, and it's identifying SHA1 hash will be stored in the oid pointer.
repo
oid
Pointer where to store the written OID
Repository where to store the object
Tree builder to write
GIT_SUCCESS or an error code