From: Linus Torvalds <torvalds@osdl.org>
To: Ian Molton <spyro@f2s.com>
Cc: git@vger.kernel.org
Subject: Re: Merge problems.
Date: Sat, 4 Feb 2006 16:13:37 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0602041604290.3854@g5.osdl.org> (raw)
In-Reply-To: <43E52FD3.20202@f2s.com>
On Sat, 4 Feb 2006, Ian Molton wrote:
>
> Doing the following:
>
> git checkout -b mywork v2.6.12
> # work, work, work
> git commit -a
> git merge "Merging happily." mywork v2.6.15
>
> At theat point I get a merge failure - I assume that means I've
> got conflicts. I forgot to not the exact error.
It would be interesting to hear what the error is, but yes, it sounds like
file-level conflicts. However, the fact that you get them for files you
haven't even touched:
> so I can see unmerged files using git ls-files --unmerged which lists a
> lot of SHA1 hashes and paths. but most of the files in the list I havent
> touched! why would they have any conflicts? surely they would simply
> update 2.6.12->2.6.15 ?
You really shouldn't get any conflicts for anything you haven't touched,
since your starting point and the thing you are mergeing to are related,
so they shouldn't have any issues.
One common error people have is that the "merge" binary isn't in their
path, and the actual error is that the first path you _did_ touch failed
to do a three-way merge, and the merge simply has never happened.
If you do _just_ "merge" (no "git", no aguments, no _nothing_), do you get
a message like
merge: not enough arguments
merge: usage: merge [-AeEpqxX3] [-L lab [-L lab [-L lab]]] file1 file2 file3
merge aborted
(which is ok) or do you get a message like
bash: merge: command not found
(which means that you don't have a three-way merge at all)?
If you don't have the merge command, install the rcs package.
> The SHA1 hashes are all listed at least twice per file too, eg.
>
> 100644 d058e65daf19f4bb8c257e2273f4c935ccee5121 1 Documentation/DocBook/scsidrivers.tmpl
> 100644 d058e65daf19f4bb8c257e2273f4c935ccee5121 2 Documentation/DocBook/scsidrivers.tmpl
That's the "stage1" and "stage2" results. The SHA1's are identical, so it
should merge beautifully, and it does sound like the merge was never even
really attempted.
So
- do a "git reset --hard" to undo the partial (undone) merge
- do "yum install rcs" (or apt get, or whatever) to make sure that you
have the three-way merge binary.
- if it still doesn't work, please make sure to save all the error
messages so that we can see them..
Thanks,
Linus
prev parent reply other threads:[~2006-02-05 0:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-04 22:50 Merge problems Ian Molton
2006-02-05 0:13 ` Linus Torvalds [this message]
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=Pine.LNX.4.64.0602041604290.3854@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=spyro@f2s.com \
/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).