merge-ort: implement CE_SKIP_WORKTREE handling with conflicted entries
commit66b209b86ad3b79728d3f0f22e1bdef6b17a12c1
authorElijah Newren <newren@gmail.com>
Sat, 20 Mar 2021 00:03:50 +0000 (20 00:03 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 20 Mar 2021 19:35:40 +0000 (20 12:35 -0700)
tree64a00b23586ed5a9957be46541dcc966a5175fbf
parent8ddc20b8969120329a9369e19816aa9088c9550e
merge-ort: implement CE_SKIP_WORKTREE handling with conflicted entries

When merge conflicts occur in paths removed by a sparse-checkout, we
need to unsparsify those paths (clear the SKIP_WORKTREE bit), and write
out the conflicted file to the working copy.  In the very unlikely case
that someone manually put a file into the working copy at the location
of the SKIP_WORKTREE file, we need to avoid overwriting whatever edits
they have made and move that file to a different location first.

Signed-off-by: Elijah Newren <newren@gmail.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-ort.c
t/t6428-merge-conflicts-sparse.sh