diff options
author | Lars Hjemli <hjemli@gmail.com> | 2009-12-08 19:32:48 +0100 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-12-08 19:32:48 +0100 |
commit | f4f6210b4f9c214dc247567bbd06b1135c9ecd06 (patch) | |
tree | 432b3dc327e05220c6ac0aff9ca81cf38a47524c /ui-commit.c | |
parent | Merge branch 'master' of http://op-co.de/cgit (diff) | |
parent | In side-by-side diff, add support for marking individual characters. (diff) | |
download | cgit-pink-f4f6210b4f9c214dc247567bbd06b1135c9ecd06.tar.gz cgit-pink-f4f6210b4f9c214dc247567bbd06b1135c9ecd06.zip |
Merge branch 'ro/ssdiff'
Diffstat (limited to '')
-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 @@ -58,9 +58,14 @@ void cgit_print_commit(char *hex) html("</td></tr>\n"); html("<tr><th>commit</th><td colspan='2' class='sha1'>"); 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"); html("<tr><th>tree</th><td colspan='2' class='sha1'>"); tmp = xstrdup(hex); @@ -78,10 +83,10 @@ void cgit_print_commit(char *hex) html("<tr><th>parent</th>" "<td colspan='2' class='sha1'>"); 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>"); parents++; } |