X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/d1f3bbe9d22029f45a77bb938c176ccc0c827d46..89aa3c0d0a4c6d9885272602005975b763ea1604:/ui-commit.c
diff --git a/ui-commit.c b/ui-commit.c
index 25721ca..c2fafd7 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -7,6 +7,9 @@
*/
#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;
@@ -62,16 +65,16 @@ void print_fileinfo(struct fileinfo *info)
html("
");
htmlf("| ");
if (is_null_sha1(info->new_sha1)) {
- html_filemode(info->old_mode);
+ cgit_print_filemode(info->old_mode);
} else {
- html_filemode(info->new_mode);
+ cgit_print_filemode(info->new_mode);
}
if (info->old_mode != info->new_mode &&
!is_null_sha1(info->old_sha1) &&
!is_null_sha1(info->new_sha1)) {
html("[");
- html_filemode(info->old_mode);
+ cgit_print_filemode(info->old_mode);
html("]");
}
htmlf(" | ", class);
@@ -216,10 +219,11 @@ void cgit_print_commit(char *hex)
print_fileinfo(&items[i]);
html("");
html(" ");
- 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(") ");
}
cgit_free_commitinfo(info);
|