-rw-r--r-- | ui-commit.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ui-commit.c b/ui-commit.c index f5b0ae5..b5e3c01 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -60,5 +60,10 @@ void cgit_print_commit(char *hex) tmp = sha1_to_hex(commit->object.sha1); - cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp); + cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, 0); html(" ("); cgit_patch_link("patch", NULL, NULL, NULL, tmp); + html(") ("); + if ((ctx.qry.ssdiff && !ctx.cfg.ssdiff) || (!ctx.qry.ssdiff && ctx.cfg.ssdiff)) + cgit_commit_link("unidiff", NULL, NULL, ctx.qry.head, tmp, 1); + else + cgit_commit_link("side-by-side diff", NULL, NULL, ctx.qry.head, tmp, 1); html(")</td></tr>\n"); @@ -80,6 +85,6 @@ void cgit_print_commit(char *hex) cgit_commit_link(sha1_to_hex(p->item->object.sha1), NULL, NULL, - ctx.qry.head, sha1_to_hex(p->item->object.sha1)); + ctx.qry.head, sha1_to_hex(p->item->object.sha1), 0); html(" ("); cgit_diff_link("diff", NULL, NULL, ctx.qry.head, hex, - sha1_to_hex(p->item->object.sha1), NULL); + sha1_to_hex(p->item->object.sha1), NULL, 0); html(")</td></tr>"); |