summaryrefslogtreecommitdiffabout
path: root/ui-commit.c
Side-by-side diff
Diffstat (limited to 'ui-commit.c') (more/less context) (show whitespace changes)
-rw-r--r--ui-commit.c8
1 files changed, 6 insertions, 2 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)
char *tmp;
+ int parents = 0;
@@ -77,2 +78,3 @@ void cgit_print_commit(char *hex)
html(")</td></tr>");
+ parents++;
}
@@ -91,5 +93,7 @@ void cgit_print_commit(char *hex)
html("</div>");
- if (!(commit->parents && commit->parents->next &&
- commit->parents->next->next)) {
+ if (parents < 3) {
+ if (parents)
tmp = sha1_to_hex(commit->parents->item->object.sha1);
+ else
+ tmp = NULL;
cgit_print_diff(ctx.qry.sha1, tmp, NULL);