]> git.ipfire.org Git - thirdparty/git.git/commit - t/t6423-merge-rename-directories.sh
merge-recursive: improve handling for rename/rename(2to1) conflicts
authorElijah Newren <newren@gmail.com>
Thu, 8 Nov 2018 04:40:27 +0000 (20:40 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Nov 2018 05:23:53 +0000 (14:23 +0900)
commitbbafc9c44ae7109f636772350934b3c5d747da44
tree6a0fa50543947df42adab3818ce62f90d136ac0a
parent7f8671656f31f5d1cc9d9748b7dc62b76a428cc5
merge-recursive: improve handling for rename/rename(2to1) conflicts

This makes the rename/rename(2to1) conflicts use the new
handle_file_collision() function.  Since that function was based
originally on the rename/rename(2to1) handling code, the main
differences here are in what was added.  In particular:

  * Instead of storing files at collide_path~HEAD and collide_path~MERGE,
    the files are two-way merged and recorded at collide_path.

  * Instead of recording the version of the renamed file that existed
    on the renamed side in the index (thus ignoring any changes that
    were made to the file on the side of history without the rename),
    we do a three-way content merge on the renamed path, then store
    that at either stage 2 or stage 3.

  * Note that since the content merge for each rename may have conflicts,
    and then we have to merge the two renamed files, we can end up with
    nested conflict markers.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c
t/t6036-recursive-corner-cases.sh
t/t6042-merge-rename-corner-cases.sh
t/t6043-merge-rename-directories.sh