{"thread":{"id":"15477","subject":"Re: git merge vs git commit","startedAt":"2008-09-10T17:42:44Z","lastAt":"2008-09-10T17:42:44Z","messageCount":1,"participants":["Ulrik Sverdrup"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"90373","messageId":"a1b6cb1b0809101042x2d097524q7b95d4164141a443@mail.gmail.com","threadId":"15477","inReplyTo":null,"subject":"Re: git merge vs git commit","fromName":"Ulrik Sverdrup","fromEmail":"ulrik.sverdrup@gmail.com","sentAt":"2008-09-10T17:42:44Z","receivedAt":"2008-09-10T17:42:44Z","isPatch":false,"sender":{"key":"ulrik.sverdrup@gmail.com","avatar":null},"body":"Matthieu Moy <Matthieu.Moy@imag.fr>:\n>\n>>Russell King <rmk@arm.linux.org.uk> writes:\n>>\n>> Hi,\n>>\n>> Using git 1.5.4.5, I notice that the result from git merge and git commit\n>> are different in an unexpected way.\n>>\n>> Take the following tree:\n>>\n>>      B---C---D---E2\n>>     /\n>>   -A1\n>>     \\\n>>      F---G---H---I3\n>>\n>> (letters represent commits, numbers represent where the references are).\n>>\n>> Your current head is '1', and you want to merge branches '2' and '3', so\n>> you use:\n>>\n>>      git merge 2 3\n>\n>AAUI, \"git merge 2 3\" doesn't mean \"merge 2 and 3 together\", but\n>\"merge 2 and 3 with the current HEAD\". So, what you wanted was :\n>\n>git checkout 1\n>git merge 2\n>\n>And what you did was an octopus merge of A, E and I (which ends up\n>being the same since A is anyway the common ancestor of E and I).\n>\n>Now, this doesn't explain why the conflicted merge gives a result\n>different from the other.\n>\n\n(I'm not on the list, please CC)\n\nReading the whole thread I think we have an explanation: octupus-merge\nlearned to remove reduntant parents and does so in the clean merge\ncase, but merge in general does not it; this is what happens in the\nconflict case.\n\nHowever it remains that three parents are to be expected with the\ngiven user action\n\nUlrik Sverdrup\n"}]}