{"thread":{"id":"3240","subject":"Merge problems.","startedAt":"2006-02-04T22:50:59Z","lastAt":"2006-02-05T00:13:37Z","messageCount":2,"participants":["Ian Molton","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"15587","messageId":"43E52FD3.20202@f2s.com","threadId":"3240","inReplyTo":null,"subject":"Merge problems.","fromName":"Ian Molton","fromEmail":"spyro@f2s.com","sentAt":"2006-02-04T22:50:59Z","receivedAt":"2006-02-04T22:50:59Z","isPatch":false,"sender":{"key":"spyro@f2s.com","avatar":null},"body":"Doing the following:\n\ngit checkout -b mywork v2.6.12\n# work, work, work\ngit commit -a\ngit merge \"Merging happily.\" mywork v2.6.15\n\nAt theat point I get a merge failure - I assume that means I've\ngot conflicts. I forgot to not the exact error.\n\nso I can see unmerged files using git ls-files --unmerged which lists a\nlot of SHA1 hashes and paths. but most of the files in the list I havent\ntouched! why would they have any conflicts? surely they would simply\nupdate 2.6.12->2.6.15 ?\n\nThe SHA1 hashes are all listed at least twice per file too, eg.\n\n100644 d058e65daf19f4bb8c257e2273f4c935ccee5121 1\nDocumentation/DocBook/scsidrivers.tmpl\n100644 d058e65daf19f4bb8c257e2273f4c935ccee5121 2\nDocumentation/DocBook/scsidrivers.tmpl\n\nWhat does this mean?\n\nHow do I work out what needs merging byhand?\n"},{"id":"15593","messageId":"Pine.LNX.4.64.0602041604290.3854@g5.osdl.org","threadId":"3240","inReplyTo":"43E52FD3.20202@f2s.com","subject":"Re: Merge problems.","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-02-05T00:13:37Z","receivedAt":"2006-02-05T00:13:37Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 4 Feb 2006, Ian Molton wrote:\n>\n> Doing the following:\n> \n> git checkout -b mywork v2.6.12\n> # work, work, work\n> git commit -a\n> git merge \"Merging happily.\" mywork v2.6.15\n> \n> At theat point I get a merge failure - I assume that means I've\n> got conflicts. I forgot to not the exact error.\n\nIt would be interesting to hear what the error is, but yes, it sounds like \nfile-level conflicts. However, the fact that you get them for files you \nhaven't even touched:\n\n> so I can see unmerged files using git ls-files --unmerged which lists a\n> lot of SHA1 hashes and paths. but most of the files in the list I havent\n> touched! why would they have any conflicts? surely they would simply\n> update 2.6.12->2.6.15 ?\n\nYou really shouldn't get any conflicts for anything you haven't touched, \nsince your starting point and the thing you are mergeing to are related, \nso they shouldn't have any issues.\n\nOne common error people have is that the \"merge\" binary isn't in their \npath, and the actual error is that the first path you _did_ touch failed \nto do a three-way merge, and the merge simply has never happened.\n\nIf you do _just_ \"merge\" (no \"git\", no aguments, no _nothing_), do you get \na message like\n\n\tmerge: not enough arguments\n\tmerge: usage: merge [-AeEpqxX3] [-L lab [-L lab [-L lab]]] file1 file2 file3\n\tmerge aborted\n\n(which is ok) or do you get a message like\n\n\tbash: merge: command not found\n\n(which means that you don't have a three-way merge at all)?\n\nIf you don't have the merge command, install the rcs package.\n\n> The SHA1 hashes are all listed at least twice per file too, eg.\n> \n> 100644 d058e65daf19f4bb8c257e2273f4c935ccee5121 1 Documentation/DocBook/scsidrivers.tmpl\n> 100644 d058e65daf19f4bb8c257e2273f4c935ccee5121 2 Documentation/DocBook/scsidrivers.tmpl\n\nThat's the \"stage1\" and \"stage2\" results. The SHA1's are identical, so it \nshould merge beautifully, and it does sound like the merge was never even \nreally attempted. \n\nSo\n - do a \"git reset --hard\" to undo the partial (undone) merge\n - do \"yum install rcs\" (or apt get, or whatever) to make sure that you \n   have the three-way merge binary.\n - if it still doesn't work, please make sure to save all the error \n   messages so that we can see them..\n\nThanks,\n\n\t\tLinus\n"}]}