From: Junio C Hamano Date: Mon, 21 Mar 2011 17:45:53 GMT Subject: Re: [PATCHv2 2/3] revision.c: introduce --min-parents and --max-parents Message-ID: <7v8vw8qsdq.fsf@alter.siamese.dyndns.org> In-Reply-To: <41d12c53966faa9c9cb5acc7646e9098dcd911ea.1300702130.git.git@drmicha.warpmail.net> Michael J Gruber writes: > Implementation note: > > We compute the number of parents only when we limit by that, so there > is no performance impact when there are no limiters. Only about 16% of the commits in git.git (and 7% in the kernel) are two parent merges and the rest are mostly single strand of pearls, so even the cost of counting all the parents in a loop that does not exit early when it reaches max-parents limit should be negligible, and checking against max-parents in each iteration would probably costs even more. So I think this is a good to go. Thanks.