Re: [PATCH 3/3] name-rev: --weight option (WIP)
- From
Jeff King <peff@peff.net>
- Date
- Aug 30, 2012, 03:55 UTC
- Message-ID
- <20120830035552.GC32268@sigill.intra.peff.net>
- In-Reply-To
- <7vharlujaq.fsf@alter.siamese.dyndns.org>
On Wed, Aug 29, 2012 at 08:53:49PM -0700, Junio C Hamano wrote:
Show 15 quoted lines
> Jeff King <peff@peff.net> writes: > > > I wonder if you can > > define the weight as a recursive function of the parents. > > I do not think we can. A merge Z between X (that has N commits > behind it) and Y (that has M commits behind it) has at most N+M+1 > commits behind it (counting itself), but we cannot tell how many > among these N and M are shared. > > > That would double-count "A" and "B" in this example. But maybe there is > > a clever way to define it that avoids that. > > We've dealt with this issue long time ago when we optimized the > bisection count, which involves exactly the same issue.
OK. I didn't think too hard about it, so I'll trust you that it is not easy. I wonder if using the generation number would be another way of defining "oldest" that would be easier to calculate.
-Peff