X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/b1f9b9c1459cb9a30ebf80721aff6ef788d1f891..89aa3c0d0a4c6d9885272602005975b763ea1604:/ui-commit.c diff --git a/ui-commit.c b/ui-commit.c index ed25824..c2fafd7 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -8,6 +8,8 @@ #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; @@ -217,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);