merge-tree: fix d/f conflicts
commit35ffe7583108ab236dcf81226690388491d9962f
authorJunio C Hamano <gitster@pobox.com>
Thu, 13 Dec 2012 23:51:29 +0000 (13 15:51 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 26 Dec 2012 22:46:15 +0000 (26 14:46 -0800)
tree7e10e89e49f8c7184486d965d3544d515afa389b
parent8dd15c6a909c059c6fd4f4dd914dbf932617ea57
merge-tree: fix d/f conflicts

The previous commit documented two known breakages revolving around
a case where one side flips a tree into a blob (or vice versa),
where the original code simply gets confused and feeds a mixture of
trees and blobs into either the recursive merge-tree (and recursing
into the blob will fail) or three-way merge (and merging tree contents
together with blobs will fail).

Fix it by feeding trees (and only trees) into the recursive
merge-tree machinery and blobs (and only blobs) into the three-way
content level merge machinery separately; when this happens, the
entire merge has to be marked as conflicting at the structure level.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge-tree.c
t/t4300-merge-tree.sh