[RFH] 3way still has D/F conflict problems...

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Date: Monday, July 23, 2007 - 3:22 am

The four commit series starting at 4c4caaf fixed a few D/F
conflict case in merge recursive.

  4c4caaf... Treat D/F conflict entry more carefully in unpack-tree...
  ac7f0f4... merge-recursive: do not barf on "to be removed" entries.
  4d50895... merge-recursive: handle D/F conflict case more carefully.
  885b981... t3030: merge-recursive backend test.

However this ended up regressed the following case (don't bother
bisecting, it will point at 4c4caaf).

The test case starts with a tree with a directory at D/,
one branch (master) modifies files in it, while the other branch
(side) makes a bunch of rename and has a blob at D.A, D, and D0C

Yes, this does not trigger if you change D.A to DxA (anything
that does not sort before D/ in the index).

Anybody interested in figuring out how to fix unpack-trees.c
without breaking the problem the above series fixed?

---

 t/t3031-df-3way.sh |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)
 create mode 100755 t/t3031-df-3way.sh

diff --git a/t/t3031-df-3way.sh b/t/t3031-df-3way.sh
new file mode 100755
index 0000000..42548d2
--- /dev/null
+++ b/t/t3031-df-3way.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+test_description='D/F conflicting threeway merge'
+
+. ./test-lib.sh
+
+fill () {
+	cnt="$1"
+	shift
+	while test "$cnt" -ge 0
+	do
+		cnt=$(( $cnt - 1 ))
+		for line
+		do
+			echo "$line"
+		done
+	done
+}
+
+T=D
+
+test_expect_success 'setup' '
+
+	mkdir D &&
+	fill 50 "Tis true without lying, certain & most true." >D/A &&
+	fill 50 "The Sun is its father, the moon its mother," >D/B &&
+	fill 50 "the wind hath carried it in its belly, the earth its nourse." >D/C &&
+	git add D/A D/B D/C &&
+	test_tick &&
+	git commit -m "Initial" &&
+
+	git tag initial &&
+	git branch side &&
+
+	echo "It has the Sun for father and the Moon for mother:" >>D/B &&
+	test_tick &&
+	git commit -a -m "master changes in-place" &&
+
+	git checkout side &&
+	echo "Truth! Certainty! That in which there is no doubt!" >D.A &&
+	cat D/A >>D.A &&
+	echo "Its father is the Sun and its mother the Moon." >B &&
+	cat D/B >>B &&
+	mv D/C D0C &&
+	rm -rf D &&
+	mv B $T &&
+	git add D.A $T D0C &&
+	test_tick &&
+	git commit -a -m "side moves and makes changes"
+'
+
+test_expect_success 'threeway' '
+
+	git read-tree -m initial side master
+
+'
+
+test_done

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFH] 3way still has D/F conflict problems..., Junio C Hamano, (Mon Jul 23, 3:22 am)