diff-merge-strings

diff-merge-strings is a compiled Lisp function in `diff-mode.el'.

(diff-merge-strings ANCESTOR FROM TO)

Merge the diff between ANCESTOR and FROM into TO.
Returns the merged string if successful or nil otherwise.
The strings are assumed not to contain any "\n" (i.e. end of line).
If ANCESTOR = FROM, returns TO.
If ANCESTOR = TO, returns FROM.
The heuristic is simplistic and only really works for cases
like (diff-merge-strings "b/foo" "b/bar" "/a/c/foo").