Re: [PATCH v2 17/21] bisect: rename count_distance() to compute_weight()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 15, 2016, 22:12 UTC
- Message-ID
- <xmqq37qm8qsr.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1460294354-7031-18-git-send-email-s-beyer@gmx.net>
Stephan Beyer <s-beyer@gmx.net> writes:
Show 13 quoted lines
> Let us use the term "weight" for the number of ancestors
> of each commit, and "distance" for the number
> min{weight, #commits - weight}. (Bisect finds the commit
> with maximum distance.)
>
> In these terms, "count_distance()" is the wrong name of
> the function. So it is renamed to "compute_weight()",
> and it also directly sets the computed weight.
>
> Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
> ---
> bisect.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)Makes sense. We can think of the "distance" the distance from the periphery of the graph we are looking at, and "bisection" is to find a point close to the center of the graph.