Expose git_index_write_tree as ObjectDatabase.CreateTree(index), git_index_read_tree as Index.SetEntries(tree)