summaryrefslogtreecommitdiffabout
path: root/ui-commit.c
Unidiff
Diffstat (limited to 'ui-commit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-commit.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ui-commit.c b/ui-commit.c
index 1aa5d34..4bbb391 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -20,2 +20,3 @@ void cgit_print_commit(char *hex)
20 char *tmp; 20 char *tmp;
21 int parents = 0;
21 22
@@ -77,2 +78,3 @@ void cgit_print_commit(char *hex)
77 html(")</td></tr>"); 78 html(")</td></tr>");
79 parents++;
78 } 80 }
@@ -91,5 +93,7 @@ void cgit_print_commit(char *hex)
91 html("</div>"); 93 html("</div>");
92 if (!(commit->parents && commit->parents->next && 94 if (parents < 3) {
93 commit->parents->next->next)) { 95 if (parents)
94 tmp = sha1_to_hex(commit->parents->item->object.sha1); 96 tmp = sha1_to_hex(commit->parents->item->object.sha1);
97 else
98 tmp = NULL;
95 cgit_print_diff(ctx.qry.sha1, tmp, NULL); 99 cgit_print_diff(ctx.qry.sha1, tmp, NULL);