{"thread":{"id":"27071","subject":"[PATCH] Documentation: update to git-merge-base --octopus","startedAt":"2011-04-12T15:46:32Z","lastAt":"2011-04-12T15:46:32Z","messageCount":1,"participants":["Vincent van Ravesteijn"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"165691","messageId":"4DA473D8.5010001@lyx.org","threadId":"27071","inReplyTo":null,"subject":"[PATCH] Documentation: update to git-merge-base --octopus","fromName":"Vincent van Ravesteijn","fromEmail":"vfr@lyx.org","sentAt":"2011-04-12T15:46:32Z","receivedAt":"2011-04-12T15:46:32Z","isPatch":true,"sender":{"key":"vfr@lyx.org","avatar":"https://avatars.githubusercontent.com/u/687868?v=4"},"body":"1) Make\nit\nclear\nthat\nwhen\nthe\n--octopus\nparameter\nis\ngiven\nto 'git\nmerge-base',\nonly a\nset of\ncommits\nis\nexpected as\nthe\nparameter.\nOn the\nother\nhand,\nin the\ncase\nwithout\nthe\n--octopus\nparameter,\nit is\nnecessary\nto\nsupply\na\nsingle\ncommit\nand a\nset.\nMoreover,\nin the\ncase of\n--octopus\nmerging, a\nsingle\ncommit\nis also\nvalid,\nwhich\nis not\nthe\ncase\notherwise.\n\n2) Add\na\nsentence to\nthe\ndiscussion\nthat\nwhen\n--octopus\nis\nused,\nwe do\nexpect\n'2'\nas the\nresult.\n\nSigned-off-by:\nVincent\nvan\nRavesteijn\n<vfr@lyx.org>\n---\n Documentation/git-merge-base.txt |    6 +++++-\n builtin/merge-base.c             |    3 ++-\n 2\nfiles\nchanged, 7\ninsertions(+),\n2\ndeletions(-)\n\ndiff\n--git\na/Documentation/git-merge-base.txt\nb/Documentation/git-merge-base.txt\nindex\needef1b..1bac04f\n100644\n---\na/Documentation/git-merge-base.txt\n+++\nb/Documentation/git-merge-base.txt\n@@ -9,7\n+9,8 @@\ngit-merge-base\n- Find\nas good\ncommon\nancestors\nas\npossible for\na merge\n SYNOPSIS\n --------\n [verse]\n-'git\nmerge-base'\n[-a|--all]\n[--octopus]\n<commit> <commit>...\n+'git\nmerge-base'\n[-a|--all]\n<commit> <commit>...\n+'git\nmerge-base'\n[-a|--all]\n--octopus\n<commit>...\n 'git\nmerge-base'\n--independent\n<commit>...\n\n DESCRIPTION\n@@\n-89,6\n+90,9\n@@ and\nthe\nresult\nof `git\nmerge-base\nA M` is\n'1'.\nCommit\n'2' is\nalso a\n common\nancestor between\n'A' and\n'M',\nbut '1'\nis a\nbetter\ncommon\nancestor,\n because '2' is an ancestor of '1'.  Hence, '2' is not a merge base.\n\n+When\nthe\noption\n`--octopus`\nis\ngiven,\nthe\nresult\nof `git\nmerge-base\nA B C`\n+is\nexpected to\nbe '2',\nsince\n'2' is\nthe\ncommon\nancestor of\nall\nbranches.\n+\n When\nthe\nhistory\ninvolves criss-cross\nmerges,\nthere\ncan be\nmore\nthan\none\n 'best'\ncommon\nancestor for\ntwo\ncommits.\nFor\nexample, with\nthis\ntopology:\n\ndiff\n--git\na/builtin/merge-base.c\nb/builtin/merge-base.c\nindex\n96dd160..4f30f1b\n100644\n---\na/builtin/merge-base.c\n+++\nb/builtin/merge-base.c\n@@\n-23,7\n+23,8\n@@\nstatic\nint\nshow_merge_base(struct\ncommit\n**rev,\nint\nrev_nr,\nint\nshow_all)\n }\n\n static\nconst\nchar *\nconst\nmerge_base_usage[]\n= {\n-\t\"git\nmerge-base\n[-a|--all]\n[--octopus]\n<commit> <commit>...\",\n+\t\"git\nmerge-base\n[-a|--all]\n<commit> <commit>...\",\n+\t\"git\nmerge-base\n[-a|--all]\n--octopus\n<commit>...\",\n \t\"git\nmerge-base\n--independent\n<commit>...\",\n \tNULL\n };\n-- \n1.7.3.1.msysgit.0\n"}]}