Commit 72f85f8c3ae4b36f7f5c13835be4cfcca33ce82d

Stefan Sperling 2018-06-11T21:36:08

fix endless loop in commit graph

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/lib/commit_graph.c b/lib/commit_graph.c
index 90a7305..eb9d8bd 100644
--- a/lib/commit_graph.c
+++ b/lib/commit_graph.c
@@ -183,6 +183,7 @@ add_node_to_iter_list(struct got_commit_graph *graph,
 	do {
 		if (node->commit_timestamp == n->commit_timestamp) {
 			TAILQ_INSERT_AFTER(&graph->iter_list, n, node, entry);
+			break;
 		} else if (node->commit_timestamp < n->commit_timestamp) {
 			next = TAILQ_NEXT(n, entry);
 			if (next == NULL) {