Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [RFH] 3way still has D/F conflict problems...
Date: Mon, 23 Jul 2007 00:22:51 -0700	[thread overview]
Message-ID: <7vejizmvn8.fsf@assigned-by-dhcp.cox.net> (raw)

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

                 reply	other threads:[~2007-07-23  7:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vejizmvn8.fsf@assigned-by-dhcp.cox.net \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox