aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2008-04-12 15:53:53 +0200
committerLars Hjemli <hjemli@gmail.com>2008-04-12 20:00:40 +0200
commit89aa3c0d0a4c6d9885272602005975b763ea1604 (patch)
tree4527f91c87d65426e5cd72b1d3e9da2d37ceb6d3
parentf135569b2be3fb1816f802f9a162b3743b735d1c (diff)
downloadcgit-89aa3c0d0a4c6d9885272602005975b763ea1604.tar.gz
cgit-89aa3c0d0a4c6d9885272602005975b763ea1604.tar.bz2
Include diff in commit view
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r--ui-commit.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui-commit.c b/ui-commit.c
index 8019e36..c2fafd7 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -9,6 +9,7 @@
#include "cgit.h"
#include "html.h"
#include "ui-shared.h"
+#include "ui-diff.h"
static int files, slots;
static int total_adds, total_rems, max_changes;
@@ -218,10 +219,11 @@ void cgit_print_commit(char *hex)
print_fileinfo(&items[i]);
html("</table>");
html("<div class='diffstat-summary'>");
- htmlf("%d files changed, %d insertions, %d deletions (",
+ htmlf("%d files changed, %d insertions, %d deletions",
files, total_adds, total_rems);
- cgit_diff_link("show diff", NULL, NULL, ctx.qry.head, hex,
- NULL, NULL);
+ cgit_print_diff(ctx.qry.sha1,
+ sha1_to_hex(commit->parents->item->object.sha1),
+ NULL);
html(")</div>");
}
cgit_free_commitinfo(info);