Junio C Hamano <gits...@pobox.com> writes:

>       for (i = 0; i < cnt; i++) {
> -             if (rslt[i])
> +             /*
> +              * Is rslt[i] an ancestor of any of the others?
> +              * then it is not interesting to us.
> +              */
> +             for (j = 0; j < i; j++)
> +                     others[j] = rslt[j];
> +             for (j = 1 + 1; j < cnt; j++)

s/1 + 1/i + 1/;

With that, all tests seem to pass ;-)

> +                     others[j - 1] = rslt[j];
> +             list = merge_bases_many(rslt[i], cnt - 1, others);
> +             clear_commit_marks(rslt[i], all_flags);
> +             for (j = 0; j < cnt - 1; j++)
> +                     clear_commit_marks(others[j], all_flags);
> +             while (list) {
> +                     if (rslt[i] == list->item)
> +                             break;
> +                     list = list->next;
> +             }
> +             if (!list)
>                       commit_list_insert_by_date(rslt[i], &result);
> +             free_commit_list(list);
>       }
>       free(rslt);
> +     free(others);
>       return result;
>  }
--
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