# Re: \[PATCH\] merge-recursive: add/add really is modify/modify with an empty base

- From: Junio C Hamano \<hidden\>
- Date: 2016-08-11 19:47:25 
- List: git
- Page: https://ratatoskr.run/git/2016/08/7689609
- Thread: https://ratatoskr.run/git/2016/08/7689609/t.md

```text
"Catalin Marinas" [ref] writes:

> On 13/12/06, Junio C Hamano [ref] wrote:
>> Johannes Schindelin [ref] writes:
>>
> What is this new xdl_merge()? Is it a better replacement for diff3? In
> this situation diff3 would actually show two confict parts, each of
> them being the full file, with an empty ancestor.

The calls to xdl_merge() from merge-recursive replace
invocations to external "merge" from RCS suite.

An older merge-recursive had a bug (as you noticed and adjusted
StGIT with the commit 8d41555) in that it did not leave anything
in the working tree in add/add situation, while merge-resolve
would have left its best attempt of ancestor-less two file merge
(which is not necessarily the straight diff3 "no common section,
full copies from both" result).  The change in question corrects
that problem and merge-recursive would create a file in the
working tree just like merge-resolve would.

You were CC'ed just in case this change in behaviour might
interact with the abovementioned change in StGIT, but as you say
the change would not break StGIT, we would all be happy ;-).
```
