commit d415e120d8f07423e264782724cce6af29c6432f from: Stefan Sperling date: Wed Sep 19 12:19:23 2018 UTC fix previous: last entry returned by graph iteration was duplicated commit - bee6b57787582955c8680120c2047136809ece2c commit + d415e120d8f07423e264782724cce6af29c6432f blob - ce50bb5460e87267354c5c514894cfe239e00dbc blob + f71dade8771c97c99210c811c7d73b1112486624 --- lib/commit_graph.c +++ lib/commit_graph.c @@ -720,10 +720,9 @@ got_commit_graph_iter_next(struct got_object_id **id, if (graph->iter_node == TAILQ_LAST(&graph->iter_list, got_commit_graph_iter_list) && got_object_idset_num_elements(graph->open_branches) == 0) { - *id = &graph->iter_node->id; /* We are done iterating. */ graph->iter_node = NULL; - return NULL; + return got_error(GOT_ERR_ITER_COMPLETED); } if (TAILQ_NEXT(graph->iter_node, entry) == NULL)