On Sun, Apr 10, 2016 at 3:19 PM, Stephan Beyer <s-be...@gmx.net> wrote:
>
> @@ -321,14 +321,13 @@ static struct commit_list *do_find_bisection(struct 
> commit_list *list,
>                          * add one for p itself if p is to be counted,
>                          * otherwise inherit it from q directly.
>                          */
> +                       node_data(p->item)->weight = 
> node_data(q->item)->weight;
>                         if (!(flags & TREESAME)) {
> -                               weight_set(p, weight(q)+1);
> +                               node_data(p->item)->weight++;

It is not so easy to see that the above does the same thing as before.

Maybe review would be easier if this part of the code was simplified
in a separate patch and/or if the weight() and weight_set() function
were kept, maybe like this:

static inline int weight(struct commit *elem)
{
       return node_data(elem)->weight;
}

static inline void set_weight(struct commit *elem, int weight)
{
       node_data(elem)->weight = weight;
}

>                                 counted++;
>                                 show_list("bisection 2 count one",
>                                           counted, nr, list);
>                         }
> -                       else
> -                               weight_set(p, weight(q));
>
>                         /* Does it happen to be at exactly half-way? */
>                         if (!find_all && halfway(p, nr))
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to