git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Sojka <sojkam1@fel.cvut.cz>
To: git@vger.kernel.org
Cc: Michal Sojka <sojkam1@fel.cvut.cz>
Subject: [PATCH] Bug: failed octopus merge does not create MERGE_HEAD
Date: Fri, 12 Mar 2010 15:07:15 +0100	[thread overview]
Message-ID: <1268402835-12992-1-git-send-email-sojkam1@fel.cvut.cz> (raw)

Hi,

the following test case exhibits behavior which I think is a bug. If
merge-one-file cannot handle the merge we end up with unmerged index
entries and no MERGE_HEAD created. I suppose that MERGE_HEAD should be
created whenever a merge fails.

If someone gives me a hint how to correct this, I can try to do it.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>

---
 t/t7611-merge-octopus-fail.sh |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/t/t7611-merge-octopus-fail.sh b/t/t7611-merge-octopus-fail.sh
new file mode 100755
index 0000000..b7f983b
--- /dev/null
+++ b/t/t7611-merge-octopus-fail.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+test_description='git merge
+
+Testing octopus merge with one file changed and deleted on different branches.
+'
+
+. ./test-lib.sh
+
+test_expect_success 'setup' '
+	test_commit initial file &&
+	test_commit changed file &&
+	git reset --hard initial -- &&
+	git rm file &&
+	git commit -m deleted &&
+	git tag deleted &&
+	git reset --hard initial -- &&
+	test_commit file2
+'
+test_expect_success 'failed octopus merge' '
+	git reset --hard changed &&
+	test_must_fail git merge deleted file2
+'
+
+test_expect_failure 'check that MERGE_HEAD exists' '
+	test -f .git/MERGE_HEAD
+'
+
+test_done
-- 
tg: (90a2bf9..) t/test-failed-octopus-merge (depends on: master)

             reply	other threads:[~2010-03-12 14:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-12 14:07 Michal Sojka [this message]
2010-03-13 20:52 ` [PATCH] Bug: failed octopus merge does not create MERGE_HEAD Junio C Hamano
2010-03-14 19:24   ` Michal Sojka

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=1268402835-12992-1-git-send-email-sojkam1@fel.cvut.cz \
    --to=sojkam1@fel.cvut.cz \
    --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;
as well as URLs for NNTP newsgroup(s).