{"thread":{"id":"3033","subject":"Problem resolving an octopus merge conflict","startedAt":"2006-01-11T06:51:11Z","lastAt":"2006-01-11T08:33:32Z","messageCount":2,"participants":["Sean","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14468","messageId":"BAYC1-PASMTP1241F00474C3FC5C32F7A6AE240@CEZ.ICE","threadId":"3033","inReplyTo":null,"subject":"Problem resolving an octopus merge conflict","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-01-11T06:51:11Z","receivedAt":"2006-01-11T06:51:11Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"\nHi folks,\n\nAfter a failed regular merge you can fix up the conflicts by hand and then\ndo a commit; the proper parents for the merge will be picked up from\nMERGE_HEADS.  However, after a failed octopus merge this file doesn't\nexist even though conflict markers _do_ exist in the appropriate files.  A\nlittle test case is given below:\n\nmkdir otest\ncd otest\n\ngit init-db\necho A > file\ngit add file\ngit commit -m \"new file\"\n\ngit checkout -b linus\necho B > file\ngit commit -a -m \"B file\"\n\ngit checkout -b torvalds master\necho C > file\ngit commit -a -m \"C file\"\n\ngit checkout master\ngit pull . linus torvalds\n\nAt which point you'll get back:\n\ndefaulting to local storage area\nCommitting initial tree a9e3325a07117aa5381e044a8d96c26eb30d729d\nTrying simple merge with 87915efc19fb0a71f88c1da6f7da0e4454f32a68\nTrying simple merge with ec835c64be51803fb46f82c97b266cc60a0b04b7\nSimple merge did not work, trying automatic merge.\nAuto-merging file\nmerge: warning: conflicts during merge\nERROR: Merge conflict in file\nfatal: merge program failed\nNo merge strategy handled the merge.\n\nThe \"file\" will contain:\n\n<<<<<<< .merge_file_e7oHn1\nC\n=======\nB\n>>>>>>> .merge_file_6Z4LD0\n\nAfter fixing this up though, git-commit won't see this as a merge commit\nand won't add the proper parent linkages.   I'm not sure at this point\nwhat the proper fix should be or if this is just pilot error.\n\nThanks,\nSean\n"},{"id":"14469","messageId":"7virsrupsz.fsf@assigned-by-dhcp.cox.net","threadId":"3033","inReplyTo":"BAYC1-PASMTP1241F00474C3FC5C32F7A6AE240@CEZ.ICE","subject":"Re: Problem resolving an octopus merge conflict","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-11T08:33:32Z","receivedAt":"2006-01-11T08:33:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Sean\" <seanlkml@sympatico.ca> writes:\n\n> After fixing this up though, git-commit won't see this as a merge commit\n> and won't add the proper parent linkages.   I'm not sure at this point\n> what the proper fix should be or if this is just pilot error.\n\nNot a pilot error, and we do not make it explicit enough, but\ngit-merge-octopus has this comment:\n\n\techo \"Simple merge did not work, trying automatic merge.\"\n\tgit-merge-index -o git-merge-one-file -a ||\n\texit 2 ; # Automatic merge failed; should not be doing Octopus\n\nIf you need to manually fix up such a merge, that is a sure sign\nthat the branches you merged into an Octopus was not independent\nbunches after all.  Letting such a commit to be made defeats the\npoint of an Octopus, which is to bundle independent tracks of\ndevelopment.\n\nThis is more philosophical rather than technical, and may look\nbeing unhelpful to you (who wanted to create an Octopus), but is\ndone to help people who later needs to deal with such a merge\nhistory.\n"}]}