summaryrefslogtreecommitdiff
path: root/graph.c
diff options
context:
space:
mode:
authorMichał Kiedrowicz <michal.kiedrowicz@gmail.com>2009-07-25 01:45:00 +0200
committerJunio C Hamano <gitster@pobox.com>2012-09-25 11:07:15 -0700
commit656197ad380506ca0e8a0355701f9d9a4a398f66 (patch)
tree25e0cd38fc65b43709f3c1665dbb558e3c2652cc /graph.c
parent0ce2e396ee9fb0fa07e8381b338e49859dbf03db (diff)
downloadgit-656197ad380506ca0e8a0355701f9d9a4a398f66.tar.gz
graph.c: infinite loop in git whatchanged --graph -m
Running "whatchanged --graph -m" on a simple two-head merges can fall into infinite loop. Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'graph.c')
-rw-r--r--graph.c2
1 files changed, 1 insertions, 1 deletions
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)