+int merge_recursive(struct merge_options *opt,
+ struct commit *h1,
+ struct commit *h2,
+ struct commit_list *merge_bases,
+ struct commit **result);
+
+/*
+ * merge_recursive_generic can operate on trees instead of commits, by
+ * wrapping the trees into virtual commits, and calling merge_recursive().
+ * It also writes out the in-memory index to disk if the merge is successful.
+ *
+ * Outputs:
+ * - See RETURN VALUES above
+ * - *result is treated as scratch space for temporary recursive merges
+ * - opt->repo->index has the new index
+ * - new index also written to $GIT_INDEX_FILE on disk
+ * - The working tree is updated with results of the merge
+ */
+int merge_recursive_generic(struct merge_options *opt,