From: Jonathan Tan Date: Mon, 16 Jul 2018 23:08:19 GMT Subject: Re: [PATCH 11/16] test-reach: test get_merge_bases_many Message-ID: <20180716230819.259097-1-jonathantanmy@google.com> In-Reply-To: <7a3e3815c585dd3972e9bea6798a7664232157a3.1531746012.git.gitgitgadget@gmail.com> > @@ -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.)