From 656197ad380506ca0e8a0355701f9d9a4a398f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kiedrowicz?= Date: Sat, 25 Jul 2009 01:45:00 +0200 Subject: graph.c: infinite loop in git whatchanged --graph -m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Running "whatchanged --graph -m" on a simple two-head merges can fall into infinite loop. Signed-off-by: MichaƂ Kiedrowicz Signed-off-by: Junio C Hamano --- graph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graph.c') diff --git a/graph.c b/graph.c index 7e0a099f83..d92868ba12 100644 --- a/graph.c +++ b/graph.c @@ -1199,7 +1199,7 @@ void graph_show_commit(struct git_graph *graph) if (!graph) return; - while (!shown_commit_line) { + while (!shown_commit_line && !graph_is_commit_finished(graph)) { shown_commit_line = graph_next_line(graph, &msgbuf); fwrite(msgbuf.buf, sizeof(char), msgbuf.len, stdout); if (!shown_commit_line) -- cgit v1.2.3