> @@ -71,6 +78,14 @@ int cmd__reach(int ac, const char **av) > printf("%s(A,B):%d\n", av[1], in_merge_bases(A, B)); > else if (!strcmp(av[1], "is_descendant_of")) > printf("%s(A,X):%d\n", av[1], is_descendant_of(A, X)); > + else if (!strcmp(av[1], "get_merge_bases_many")) { > + struct commit_list *list = get_merge_bases_many(A, X_nr, X_array); > + printf("%s(A,X):\n", av[1]); > + while (list) { > + printf("%s\n", oid_to_hex(&list->item->object.oid)); > + list = list->next; > + } I don't think get_merge_bases_many defines a sort order on its output? It might be better to sort the resulting commit list here, so that the output is more well-defined. (And omit the informational printf so that it's slightly easier to generate the "expect" file.)