From: martin f krafft <madduck@madduck.net>
To: git discussion list <git@vger.kernel.org>
Subject: confused about a conflict during octopus merging
Date: Tue, 9 Oct 2007 01:31:56 +0100 [thread overview]
Message-ID: <20071009003156.GA30498@lapse.madduck.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 2419 bytes --]
Dear list,
I am a little confused why the following yields a conflict:
$ git init
$ touch a; git add a; git commit -ma
Created initial commit 0ba90cc: a
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a
# create merger branch for later
$ git branch merger
# create a file
$ date > d; git add d; git commit -md1
Created commit 89d22eb: d
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 d
# branch off a second branch and populate it
$ git checkout -b second
Switched to a new branch "second"
$ touch b; git add b; git commit -mb
Created commit 7370737: b
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 b
# modify file changed in previous commit
$ git checkout master
Switched to branch "master"
$ date >> d; git add d; git commit -md2
Created commit bb5f1b4: d2
1 files changed, 1 insertions(+), 1 deletions(-)
Now the tree structure is
x -- master: d2
| x -- second: b
|/
x d1
|
x -- merger: a
# now octopus-merge master+second into merger
$ git checkout merger
Switched to branch "merger"
$ git merge master second
Trying simple merge with bb5f1b4f3a8cbfcbc9dbc97cc823f3ca05db2db1
Trying simple merge with 7370737ff3aa6540a425db015e194766d2cbda2e
Simple merge did not work, trying automatic merge.
Added d in both, but differently.
error: Could not read .merge_file_mCwa4W
ERROR: Merge conflict in d
fatal: merge program failed
Automatic merge failed; fix conflicts and then commit the result.
I don't understand why these conflict. I mean, sure, it makes sense:
after merging master, file d is at d2. Now when merging second, it
tries to replace d by its ancestor, d1.
What I don't understand is why Git does not understand that commit
d is part of the path of arriving at d2, so when 'second' is merged,
Git *should* really see that the change to file d in 'second' (d1)
is an ancestor of the already present d2 commit, and *not* conflict.
What am I misunderstanding here?
Thanks,
--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
"distrust all those who love you extremely
upon a very slight acquaintance and without any visible reason."
-- lord chesterfield
spamtraps: madduck.bogus@madduck.net
[-- Attachment #2: Digital signature (see http://martin-krafft.net/gpg/) --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2007-10-09 0:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-09 0:31 martin f krafft [this message]
2007-10-09 1:21 ` confused about a conflict during octopus merging Linus Torvalds
2007-10-09 9:47 ` martin f krafft
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=20071009003156.GA30498@lapse.madduck.net \
--to=madduck@madduck.net \
--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).