From: Johannes Schindelin Date: Tue, 26 Jul 2016 16:06:30 +0000 (+0200) Subject: am -3: use merge_recursive() directly again X-Git-Tag: v2.10.0-rc0~21^2~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3f338f43b0eb8081660bbf694074a368cf07355e?hp=3f338f43b0eb8081660bbf694074a368cf07355e am -3: use merge_recursive() directly again Last October, we had to change this code to run `git merge-recursive` in a child process: git-am wants to print some helpful advice when the merge failed, but the code in question was not prepared to return, it die()d instead. We are finally at a point when the code *is* prepared to return errors, and can avoid the child process again. This reverts commit c63d4b2 (am -3: do not let failed merge from completing the error codepath, 2015-10-09), with the necessary changes to adjust for the fact that Git's source code changed in the meantime (such as: using OIDs instead of hashes in the recursive merge, and a removed gender bias). Note: the code now calls merge_recursive_generic() again. Unlike merge_trees() and merge_recursive(), this function returns 0 upon success, as most of Git's functions. Therefore, the error value -1 naturally is handled correctly, and we do not have to take care of it specifically. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano ---