Apply a git_diff to a git_tree, and return the resulting image as an index.
git_diff
git_tree
the postimage of the application
the repository to apply
the tree to apply the diff to
the diff to apply
the options for the apply (or null for defaults)