Download raw body.
Replace jot in regress
On Tue, Sep 21, 2021 at 09:44:02AM +0200, Stefan Sperling wrote: > On Tue, Sep 21, 2021 at 04:31:12AM +0000, Lucas wrote: > > OpenBSD, only failure, which I also face running without this patch, is: > > > > ==== histedit ==== > > ./histedit.sh -q -r "/home/lucas/code/git/git.gameoftrees.org/got-test-root/got-test.cr5YVj68IG" > > --- /home/lucas/code/git/git.gameoftrees.org/got-test-root/got-test.cr5YVj68IG/got-test-histedit_no_op-77iNHu1m/stdout.expected Tue Sep 21 03:57:49 2021 > > +++ /home/lucas/code/git/git.gameoftrees.org/got-test-root/got-test.cr5YVj68IG/got-test-histedit_no_op-77iNHu1m/stdout Tue Sep 21 03:57:49 2021 > > @@ -7,5 +7,3 @@ > > > > has become commit a7f05202bdc51c8f3a225be3e4d89fea313ebb6a (master) > > 2021-09-21 flan_hacker committing to zeta on master > > -history forked at 98316d0a9092e0817b44bace2ee78be726a649f6 > > - 2021-09-21 flan_hacker adding the test tree > > test failed; leaving test data in /home/lucas/code/git/git.gameoftrees.org/got-test-root/got-test.cr5YVj68IG/got-test-histedit_no_op-77iNHu1m > > > > This test is passing for me on OpenBSD. > Can you figure out why it is failing for you even without your patch? Following up on IRC discussion, does this patch make any difference? diff 3da8ef855d7d7b3da96a9f1cba55df276e112f11 /home/stsp/src/got blob - 02b48fae94b68b2e73ce447027d7d94d3be3b6c5 file + lib/commit_graph.c --- lib/commit_graph.c +++ lib/commit_graph.c @@ -605,7 +605,7 @@ got_commit_graph_find_youngest_common_ancestor(struct const struct got_error *err = NULL; struct got_commit_graph *graph = NULL, *graph2 = NULL; int completed = 0, completed2 = 0; - struct got_object_idset *commit_ids; + struct got_object_idset *commit_ids = NULL, *commit_ids2 = NULL; *yca_id = NULL; @@ -613,6 +613,13 @@ got_commit_graph_find_youngest_common_ancestor(struct if (commit_ids == NULL) return got_error_from_errno("got_object_idset_alloc"); + commit_ids2 = got_object_idset_alloc(); + if (commit_ids2 == NULL) { + err = got_error_from_errno("got_object_idset_alloc"); + goto done; + } + + err = got_commit_graph_open(&graph, "/", 1); if (err) goto done; @@ -663,7 +670,7 @@ got_commit_graph_find_youngest_common_ancestor(struct } if (id) { - if (got_object_idset_contains(commit_ids, id)) { + if (got_object_idset_contains(commit_ids2, id)) { *yca_id = got_object_id_dup(id); if (*yca_id) break; @@ -684,7 +691,7 @@ got_commit_graph_find_youngest_common_ancestor(struct break; } - err = got_object_idset_add(commit_ids, id2, NULL); + err = got_object_idset_add(commit_ids2, id2, NULL); if (err) break; } @@ -697,6 +704,7 @@ got_commit_graph_find_youngest_common_ancestor(struct } done: got_object_idset_free(commit_ids); + got_object_idset_free(commit_ids2); if (graph) got_commit_graph_close(graph); if (graph2)
Replace jot in regress