]> git.ipfire.org Git - thirdparty/git.git/commit - merge-ort.c
merge-ort: add handling for different types of files at same path
authorElijah Newren <newren@gmail.com>
Fri, 1 Jan 2021 02:34:48 +0000 (02:34 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 Jan 2021 18:40:45 +0000 (10:40 -0800)
commit4ef88fc3a8d402de272c6bfa36538bd8e4cdd439
tree431e4c8602c8792d406eaa2b0ae45ecc5e65dbab
parent4204cd591b62f3e184f617d01b282b9847298dbd
merge-ort: add handling for different types of files at same path

Add some handling that explicitly considers collisions of the following
types:
  * file/submodule
  * file/symlink
  * submodule/symlink
Leaving them as conflicts at the same path are hard for users to
resolve, so move one or both of them aside so that they each get their
own path.

Note that in the case of recursive handling (i.e. call_depth > 0), we
can just use the merge base of the two merge bases as the merge result
much like we do with modify/delete conflicts, binary files, conflicting
submodule values, and so on.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-ort.c