git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Merge problems.
@ 2006-02-04 22:50 Ian Molton
  2006-02-05  0:13 ` Linus Torvalds
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Molton @ 2006-02-04 22:50 UTC (permalink / raw)
  To: git

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.

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 ?

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

What does this mean?

How do I work out what needs merging byhand?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Merge problems.
  2006-02-04 22:50 Merge problems Ian Molton
@ 2006-02-05  0:13 ` Linus Torvalds
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 2006-02-05  0:13 UTC (permalink / raw)
  To: Ian Molton; +Cc: git



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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-05  0:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-04 22:50 Merge problems Ian Molton
2006-02-05  0:13 ` Linus Torvalds

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).