git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Clemens Buchacher <drizzd@aon.at>
To: git@vger.kernel.org
Cc: Miklos Vajna <vmiklos@frugalware.org>,
	Michael Johnson <redbeard@mdjohnson.us>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Clemens Buchacher <drizzd@aon.at>
Subject: [PATCH 1/3] add tests for merging with submodules
Date: Sun,  5 Apr 2009 02:46:58 +0200	[thread overview]
Message-ID: <1238892420-721-2-git-send-email-drizzd@aon.at> (raw)
In-Reply-To: <1238892420-721-1-git-send-email-drizzd@aon.at>


Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
 t/t7405-submodule-merge.sh |   74 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 74 insertions(+), 0 deletions(-)
 create mode 100755 t/t7405-submodule-merge.sh

diff --git a/t/t7405-submodule-merge.sh b/t/t7405-submodule-merge.sh
new file mode 100755
index 0000000..9778ad4
--- /dev/null
+++ b/t/t7405-submodule-merge.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+test_description='merging with submodules'
+
+. ./test-lib.sh
+
+#
+# history
+#
+#        a --- c
+#      /   \ /
+# root      X
+#      \   / \
+#        b --- d
+#
+
+test_expect_success setup '
+
+	mkdir sub &&
+	(cd sub &&
+	 git init &&
+	 echo original > file &&
+	 git add file &&
+	 test_tick &&
+	 git commit -m sub-root) &&
+	git add sub &&
+	test_tick &&
+	git commit -m root &&
+
+	git checkout -b a master &&
+	(cd sub &&
+	 echo A > file &&
+	 git add file &&
+	 test_tick &&
+	 git commit -m sub-a) &&
+	git add sub &&
+	test_tick &&
+	git commit -m a &&
+
+	git checkout -b b master &&
+	(cd sub &&
+	 echo B > file &&
+	 git add file &&
+	 test_tick &&
+	 git commit -m sub-b) &&
+	git add sub &&
+	test_tick &&
+	git commit -m b
+
+	git checkout -b c a &&
+	git merge -s ours b &&
+
+	git checkout -b d b &&
+	git merge -s ours a
+'
+
+test_expect_failure 'merging with modify/modify conflict' '
+
+	git checkout -b test1 a &&
+	test_must_fail git merge b &&
+	test -f .git/MERGE_MSG &&
+	git diff
+
+'
+
+test_expect_failure 'merging with a modify/modify conflict between merge bases' '
+
+	git reset --hard HEAD &&
+	git checkout -b test2 c &&
+	git merge d
+
+'
+
+test_done
-- 
1.6.2.1

  reply	other threads:[~2009-04-05  0:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-28 16:19 Segfault on merge with 1.6.2.1 Michael Johnson
2009-03-29 12:17 ` Miklos Vajna
2009-03-30  2:39   ` Michael Johnson
2009-03-30  7:48     ` Johannes Schindelin
2009-03-30 11:03     ` Miklos Vajna
2009-03-31  7:14       ` Michael Johnson
2009-04-01  5:43         ` Michael Johnson
2009-04-01  9:50           ` Miklos Vajna
2009-04-01 18:06         ` Clemens Buchacher
2009-04-02  0:33           ` Michael Johnson
2009-04-05  0:46           ` Clemens Buchacher
2009-04-05  0:46             ` Clemens Buchacher [this message]
2009-04-05  0:46               ` [PATCH 2/3] update cache for conflicting submodule entries Clemens Buchacher
2009-04-05  0:47                 ` [PATCH 3/3] simplify output of conflicting merge Clemens Buchacher
2009-04-05  9:47                   ` Junio C Hamano
2009-04-05 11:50             ` Segfault on merge with 1.6.2.1 Johannes Schindelin
2009-04-06  2:29             ` Michael Johnson
2009-04-06  6:41               ` Clemens Buchacher

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=1238892420-721-2-git-send-email-drizzd@aon.at \
    --to=drizzd@aon.at \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=redbeard@mdjohnson.us \
    --cc=vmiklos@frugalware.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;
as well as URLs for NNTP newsgroup(s).