Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 3/3] name-rev: --weight option (WIP)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:36

Junio C Hamano [off-list ref] writes:
Jeff King [off-list ref] writes:
quoted
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.
You can theoretically take all the merge bases between X and Y,
magically come up with the "weight" of a fictitious merge across
these merge bases, and subtract that number from N+M to arrive at
the weight of Z, I suppose, but it is not clear what an efficient
implementation of that "magically" part looks like.  I think that is
where we stopped when we tried to optimize the "rev-list --bisect"
node weighting logic; it punts handling the merges, and only
optimizes single strand of pearls on top of a merge with a known
weight.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help