Re: [PATCH] Introduce get_octopus_merge_bases() in commit.c
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 9, 2008, 23:41 UTC
- Message-ID
- <7vlk1edvn1.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.DEB.1.00.0806100024310.1783@racer>
Johannes Schindelin <Johannes.Schindelin@gmx.de> 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.