{"thread":{"id":"26462","subject":"Challenges for an octopus merge","startedAt":"2011-02-10T14:30:44Z","lastAt":"2011-04-08T15:27:47Z","messageCount":7,"participants":["Markus Elfring","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"160825","messageId":"4D53F694.1060105@web.de","threadId":"26462","inReplyTo":null,"subject":"Challenges for an octopus merge","fromName":"Markus Elfring","fromEmail":"markus.elfring@web.de","sentAt":"2011-02-10T14:30:44Z","receivedAt":"2011-02-10T14:30:44Z","isPatch":false,"sender":{"key":"markus.elfring@web.de","avatar":null},"body":"Hello,\n\nI have got an update history like the following in a local repository with ten \npatches in separate topic branches on my openSUSE 11.3 system.\n\nmaster -> tag: v3.0 -> compilation_maintenance\n               /->  errno => C1\n              /->   braces => C2\n             /->    string => C3\n            /->     binary_search => C4\n  -> route1 --->    temporary_files => C5\n            \\->     make_functions_static => C6\n             \\->    const-correctness => C7\n              \\->   signal_handling => C8\n               \\->  enum => C9\n                \\-> double_declaration_deletion => C10\n\n\nelfring@Sonne:~/Projekte/BtYacc/lokal2> git --version && git checkout -b test3\ngit version 1.7.3.4\nSwitched to a new branch 'test3'\nelfring@Sonne:~/Projekte/BtYacc/lokal2> git merge --no-ff --stat --verbose --log \n-m 'Combination of six topics' errno braces string binary_search temporary_files \nmake_functions_static\nFast-forwarding to: errno\nTrying simple merge with braces\nTrying simple merge with string\nTrying simple merge with binary_search\nTrying simple merge with temporary_files\nSimple merge did not work, trying automatic merge.\nAuto-merging defs.h\nTrying simple merge with make_functions_static\nSimple merge did not work, trying automatic merge.\nAuto-merging defs.h\nERROR: content conflict in defs.h\nAuto-merging main.c\nAuto-merging mkpar.c\nfatal: merge program failed\nAutomatic merge failed; fix conflicts and then commit the result.\n\n\nThe merge description (suggested commit message) was fine in the display of the \ntool \"Git GUI 0.13.0\" (Tcl/Tk version 8.5.8).\nI delete the conflict section in the header file \"defs.h\" completely.\n\n\nelfring@Sonne:~/Projekte/BtYacc/lokal2> git merge --no-ff --stat --verbose --log \n-m 'Combination of four topics' const-correctness double_declaration_deletion \nenum signal_handling\nTrying simple merge with const-correctness\nSimple merge did not work, trying automatic merge.\nAuto-merging defs.h\nAuto-merging output.c\nAuto-merging reader.c\nTrying simple merge with double_declaration_deletion\nSimple merge did not work, trying automatic merge.\nAuto-merging mkpar.c\nERROR: content conflict in mkpar.c\nfatal: merge program failed\nAutomated merge did not work.\nShould not be doing an Octopus.\nMerge with strategy octopus failed.\n\n\nThe merge description was missing (no commit message) in this case.\nIs this omission acceptable?\n\nI have also got the impression that the corresponding source files did not \ncontain enough conflict markers.\nIs my use case relevant for further considerations of details with this merging \nprocess?\n\nRegards,\nMarkus\n"},{"id":"160826","messageId":"7v8vxn6fdv.fsf@alter.siamese.dyndns.org","threadId":"26462","inReplyTo":"4D53F694.1060105@web.de","subject":"Re: Challenges for an octopus merge","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-02-10T16:09:00Z","receivedAt":"2011-02-10T16:09:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Markus Elfring <Markus.Elfring@web.de> writes:\n\n> ...\n> Automated merge did not work.\n> Should not be doing an Octopus.\n> Merge with strategy octopus failed.\n>\n>\n> The merge description was missing (no commit message) in this case.\n\nThe second-to-last line of the output needs to be rephrased.\n\nOctopus is not for recording conflicting merges and when it punts you\nshouldn't be attempting to resolve and record it as an octopus merge.\n"},{"id":"160901","messageId":"4D55627F.30305@web.de","threadId":"26462","inReplyTo":"7v8vxn6fdv.fsf@alter.siamese.dyndns.org","subject":"Re: Challenges for an octopus merge","fromName":"Markus Elfring","fromEmail":"markus.elfring@web.de","sentAt":"2011-02-11T16:23:27Z","receivedAt":"2011-02-11T16:23:27Z","isPatch":false,"sender":{"key":"markus.elfring@web.de","avatar":null},"body":"> The second-to-last line of the output needs to be rephrased.\n\nWhich wording adjustment have you got in mind?\n\n\n> Octopus is not for recording conflicting merges and when it punts you\n> shouldn't be attempting to resolve and record it as an octopus merge.\n\nWould it make sense to specify that the merging process may switch to the\nstrategy \"resolve\" on demand?\n\nRegards,\nMarkus\n"},{"id":"160904","messageId":"7vd3my1leq.fsf@alter.siamese.dyndns.org","threadId":"26462","inReplyTo":"4D55627F.30305@web.de","subject":"Re: Challenges for an octopus merge","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-02-11T18:22:21Z","receivedAt":"2011-02-11T18:22:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Markus Elfring <Markus.Elfring@web.de> writes:\n\n>> The second-to-last line of the output needs to be rephrased.\n>\n> Which wording adjustment have you got in mind?\n\nSomething along the two lines below to rephase the second-to-last line of\nthe output I quoted from your original message.\n\n>> Octopus is not for recording conflicting merges and when it punts you\n>> shouldn't be attempting to resolve and record it as an octopus merge.\n\n> Would it make sense to specify that the merging process may switch to the\n> strategy \"resolve\" on demand?\n\nDepends on what you mean by \"on demand\", but if you mean \"git merge A B C\"\nautomagically turns into \"git merge A; git merge B; git merge C\" then I\ndon't think that makes much sense.  The user needs to decide what to do\nnext; the user may choose to do \"git merge A C ; git merge B\" instead, but\n*after* inspecting the situation.\n"},{"id":"160929","messageId":"4D561188.4000109@web.de","threadId":"26462","inReplyTo":"7vd3my1leq.fsf@alter.siamese.dyndns.org","subject":"Re: Challenges for an octopus merge","fromName":"Markus Elfring","fromEmail":"markus.elfring@web.de","sentAt":"2011-02-12T04:50:16Z","receivedAt":"2011-02-12T04:50:16Z","isPatch":false,"sender":{"key":"markus.elfring@web.de","avatar":null},"body":"> The user needs to decide what to do next; the user may choose to do \"git merge A C ; git merge B\" instead,\n> but *after* inspecting the situation.\n\nI have inspected my situation a bit more. I hope that the merging process can be \nimproved so that it can cope with my update suggestions here.\n\nWould anybody (besides me) like to look into the affected patches and source \nfiles if the tool \"Git\" can provide a better service?\n\nDoes it make sense to add these files to your test-suite?\n\nRegards,\nMarkus\n"},{"id":"161195","messageId":"4D5AB7F6.8040508@web.de","threadId":"26462","inReplyTo":"7vd3my1leq.fsf@alter.siamese.dyndns.org","subject":"Re: Challenges for an octopus merge","fromName":"Markus Elfring","fromEmail":"markus.elfring@web.de","sentAt":"2011-02-15T17:29:26Z","receivedAt":"2011-02-15T17:29:26Z","isPatch":false,"sender":{"key":"markus.elfring@web.de","avatar":null},"body":"> The user needs to decide what to do next; the user may choose to do \"git merge A C ; git merge B\" instead,\n> but *after* inspecting the situation.\n\nI find a few of the applied conflict markers strange after my inspection.\n\n1. They suggest to choose one of the involved changes. But how do you think \nabout the situation if I found that the right resolution is to delete the \nconflict section completely?\n\n    Why was the merging process not able to come to the same conclusion \nautomatically?\n\n\n2. My tenth patch would like to delete six consecutive lines in a source file in \na way similar to the following example.\n\n-drop 1 ...;\n-drop 2 ...;\n-drop 3 ...;\n-drop 4 ...;\n-\n-\n  void make_parser()\n\nelfring@Sonne:~/Projekte/BtYacc/lokal2> git merge --stat --verbose -m 'Deletion \nof duplicated function declarations' double_declaration_deletion \n\nAuto-merging\nmkpar.c \n \n\nCONFLICT (content): Merge conflict in mkpar.c \n \n\nAutomatic merge failed; fix conflicts and then commit the result.\n\n\nBut the Git GUI displays this conflict like the following.\n\n   <<<<<<< HEAD\n  +drop 1 ...;\n  +drop 2 ...;\n  +drop 3 ...;\n  +drop 4 ...;\n  +\n  +static void find_final_state(void)\n   =======\n+ void make_parser()\n+ {\n...\n+ }\n+\n+ void find_final_state()\n   >>>>>>> double_declaration_deletion\n\n\nI find three details suspicious here.\n- Why are these lines marked for addition again?\n- Why is the function \"find_final_state\" referenced? (Does this indicate an \noff-by-one error in the first block?)\n- Why are those parts like make_parser() not omitted that were moved to \ndifferent places in this source file by a previous patch?\n\n\nI would appreciate your advices.\n\nRegards,\nMarkus\n"},{"id":"165425","messageId":"4D9F2973.2090400@web.de","threadId":"26462","inReplyTo":"4D53F694.1060105@web.de","subject":"Re: Challenges for an octopus merge","fromName":"Markus Elfring","fromEmail":"markus.elfring@web.de","sentAt":"2011-04-08T15:27:47Z","receivedAt":"2011-04-08T15:27:47Z","isPatch":false,"sender":{"key":"markus.elfring@web.de","avatar":null},"body":"> Automatic merge failed; fix conflicts and then commit the result.\n\nI would appreciate if the implementations of merge procedures could be improved \nso that work results like the following can be achieved in an easier way.\nhttps://github.com/elfring/BtYacc/tree/route1\n\nCan any documentation updates help in this use case, too?\n\nRegards,\nMarkus\n"}]}