apply: plug the three-way merge logic in
commit28ff051268463e93613998a017a10d3de45abbc0
authorJunio C Hamano <gitster@pobox.com>
Wed, 9 May 2012 23:10:51 +0000 (9 16:10 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jul 2012 21:40:02 +0000 (9 14:40 -0700)
tree442aa6c699280c47dc42a8b4762d9638ca7a7af3
parent519d1a5b4e044459bd7323cfa6a7cb98cec5c884
apply: plug the three-way merge logic in

When a patch does not apply to what we have, but we know the preimage the
patch was made against, we apply the patch to the preimage to compute what
the patch author wanted the result to look like, and attempt a three-way
merge between the result and our version, using the intended preimage as
the base version.

When we are applying the patch using the index, we would additionally need
to add the object names of these three blobs involved in the merge, which
is not yet done in this step, but we add a field to "struct patch" so that
later write-out step can use it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/apply.c