t6423, t6436: note improved ort handling with dirty files
authorElijah Newren <newren@gmail.com>
Mon, 26 Oct 2020 17:01:42 +0000 (17:01 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Oct 2020 19:31:24 +0000 (12:31 -0700)
commit23bef2e33c3290ae308c2ce37e290a25eb5b97bc
treeb76387d6869f0c2fa5f497c860586e554707cb7f
parentc8c35f6a02f3841d4383a5ce4c9d8e426776d151
t6423, t6436: note improved ort handling with dirty files

The "recursive" backend relies on unpack_trees() to check if unstaged
changes would be overwritten by a merge, but unpack_trees() does not
understand renames -- and once it returns, it has already written many
updates to the working tree and index.  As such, "recursive" had to do a
special 4-way merge where it would need to also treat the working copy
as an extra source of differences that we had to carefully avoid
overwriting and resulting in moving files to new locations to avoid
conflicts.

The "ort" backend, by contrast, does the complete merge inmemory, and
only updates the index and working copy as a post-processing step.  If
there are dirty files in the way, it can simply abort the merge.

Update t6423 and t6436 to reflect the better merge abilities and
expectations we have for ort, while still leaving the
best-case-as-good-as-recursive-can-do expectations there for the
recursive backend so we retain its stability until we are ready to
deprecate and remove it.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6423-merge-rename-directories.sh
t/t6436-merge-overwrite.sh