Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Strange merge failure (would be overwritten by merge / cannot merge)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:21
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

David Aguilar [off-list ref] writes:
Does anyone else on the list have any insights?
Yes; the problem does not have anything to do with renames but
unfortunately is much deeper.  See $gmane/127783.

Here is a reproduction recipe for the lowest-level ingredient of the
breakage in "git read-tree -m"that needs to be fixed, before we can start
looking at what "git merge-recursive" does incorrectly (if any) and what
"git merge" does incorrectly (again, if any).

 t/t1004-read-tree-m-u-wf.sh |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh
index f19b4a2..055bb00 100755
--- a/t/t1004-read-tree-m-u-wf.sh
+++ b/t/t1004-read-tree-m-u-wf.sh
@@ -238,4 +238,27 @@ test_expect_success 'D/F recursive' '
 
 '
 
+################################################################
+
+test_expect_failure 'D/F D-F' '
+	git reset --hard &&
+	git rm -f -r . &&
+
+	mkdir t && echo 1 >t/f && git add t &&
+	git tag ONE $(git write-tree) &&
+
+	echo 3 >t-f && echo 3 >t/f && git add t-f t &&
+	git tag THREE $(git write-tree) &&
+
+	git rm -f -r t &&
+	echo 2 >t && echo 2 >t-f && git add t t-f &&
+	git tag TWO $(git write-tree) &&
+	git commit -a -m TWO &&
+
+	test_must_fail git read-tree -m -u ONE TWO THREE &&
+	git ls-files -u >actual &&
+	grep t/f actual &&
+	grep t-f actual
+'
+
 test_done
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help