From: Alex Riesen <raa.lkml@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Junio C Hamano <junkio@cox.net>, David Euresti <evelio@gmail.com>
Subject: [PATCH] Extend t6020 with another test for d/f interactions
Date: Wed, 19 Sep 2007 00:12:08 +0200 [thread overview]
Message-ID: <20070918221208.GB14488@steel.home> (raw)
In-Reply-To: <95b3d0af0709181334y1e21507ey485860e4d45aa26f@mail.gmail.com>
A test for a merge when one of the trees has a file moved into a
directory with the same name (not just file replaced by a directory).
The problem noticed and reported by David Euresti
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
t/t6020-merge-df.sh | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
David Euresti, Tue, Sep 18, 2007 22:34:53 +0200:
> If I try to merge in the changes from the other branch or if the other
> branch tries to merge in these changes I get this error:
>
> dir/foo/foo.bin: unmerged (257cc5642cb1a054f08cc83f2d943e56fd3ebe99)
> fatal: git-write-tree: error building trees
> Merge with strategy recursive failed.
I extended the d/f merge test with the case. Have no idea how to fix
it yet though.
diff --git a/t/t6020-merge-df.sh b/t/t6020-merge-df.sh
index a19d49d..c081d3f 100755
--- a/t/t6020-merge-df.sh
+++ b/t/t6020-merge-df.sh
@@ -10,6 +10,7 @@ test_expect_success 'prepare repository' \
'echo "Hello" > init &&
git add init &&
git commit -m "Initial commit" &&
+git branch init &&
git branch B &&
mkdir dir &&
echo "foo" > dir/foo &&
@@ -22,4 +23,20 @@ git commit -m "File: dir"'
test_expect_code 1 'Merge with d/f conflicts' 'git merge "merge msg" B master'
+test_expect_success 'file moved into a dir of same name' '
+ git reset --hard &&
+ git checkout -b d1 init &&
+ mkdir dir &&
+ mv init dir/init &&
+ mv dir init &&
+ git add . &&
+ git commit -a -m"init moved into init/init" &&
+ git checkout -b d2 init &&
+ echo file >file &&
+ git add file &&
+ git commit -m"unrelated change" &&
+ git checkout d1 &&
+ git merge d2
+'
+
test_done
--
1.5.3.1.173.g9a67
next prev parent reply other threads:[~2007-09-18 22:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-18 20:34 Problem with merge when renaming David Euresti
2007-09-18 22:12 ` Alex Riesen [this message]
2007-09-18 22:28 ` Junio C Hamano
2007-09-18 22:42 ` David Euresti
2007-09-18 22:44 ` Alex Riesen
2007-09-18 23:27 ` Junio C Hamano
2007-09-19 21:11 ` Alex Riesen
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=20070918221208.GB14488@steel.home \
--to=raa.lkml@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=evelio@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).