Re: [PATCH v3 04/15] merge-tree: implement real merges
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 24, 2022, 20:04 UTC
- Message-ID
- <xmqqee3skp3x.fsf@gitster.g>
- In-Reply-To
- <CABPp-BEsYTz35XpXy_j09J9-ke4UoCTED4z3L1sq0vYHuvuKPQ@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
> So, am I correct to understand that what bugs you is actually > merge-recursive's and merge-ort's API? That you don't want these two > types of merges to have different entry points, and that there should > in fact only be one?
It is more like
It is more than OK that there are two, but the basic primitive
is the "we have this and that tree objects to merge, and use
this tree object as the ancestor" non-recursive thing, with the
recursive one being just a thin wrapper around it to compute
common ancestors, using the three-way primitive to reduce them
into a single virtual ancestor, and finally using the three-way
primitive to come up with the final result.And making the composite "recursive" feature available long before the underlying "non-recursive" primitive becomes easily accessible to the scripters and system builders simply felt backwards.