From: Junio C Hamano Date: Mon, 09 Jun 2008 23:41:06 GMT Subject: Re: [PATCH] Introduce get_octopus_merge_bases() in commit.c Message-ID: <7vlk1edvn1.fsf@gitster.siamese.dyndns.org> In-Reply-To: Johannes Schindelin writes: > However, your remark about optimizing for the two-head case got me > thinking: should we not rather use the simple algorithm Miklos proposed > for octopus_merge_bases(), even if it is suboptimal? Actually a quick glance at git-merge, a rather large case...esac after that "show-branch --merge-base" tells me that we do not really use the output from that operation and instead we check if we are fast-forward from all the other heads by iterating over them. merge-octupos would accept it as the base but never looks at it. So I think with a proper refactoring of the codepath you probably would not even have to do the blanket "merge-base across all heads" at all.