mirror of
https://git.zx2c4.com/cgit
synced 2024-11-25 18:08:41 +00:00
Include diff in commit view
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
f135569b2b
commit
89aa3c0d0a
@ -9,6 +9,7 @@
|
|||||||
#include "cgit.h"
|
#include "cgit.h"
|
||||||
#include "html.h"
|
#include "html.h"
|
||||||
#include "ui-shared.h"
|
#include "ui-shared.h"
|
||||||
|
#include "ui-diff.h"
|
||||||
|
|
||||||
static int files, slots;
|
static int files, slots;
|
||||||
static int total_adds, total_rems, max_changes;
|
static int total_adds, total_rems, max_changes;
|
||||||
@ -218,10 +219,11 @@ void cgit_print_commit(char *hex)
|
|||||||
print_fileinfo(&items[i]);
|
print_fileinfo(&items[i]);
|
||||||
html("</table>");
|
html("</table>");
|
||||||
html("<div class='diffstat-summary'>");
|
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);
|
files, total_adds, total_rems);
|
||||||
cgit_diff_link("show diff", NULL, NULL, ctx.qry.head, hex,
|
cgit_print_diff(ctx.qry.sha1,
|
||||||
NULL, NULL);
|
sha1_to_hex(commit->parents->item->object.sha1),
|
||||||
|
NULL);
|
||||||
html(")</div>");
|
html(")</div>");
|
||||||
}
|
}
|
||||||
cgit_free_commitinfo(info);
|
cgit_free_commitinfo(info);
|
||||||
|
Loading…
Reference in New Issue
Block a user