X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/f35db1cd2b75aac6952aa07713e44ca01fd89727..ff3a3b4e2b7463bb8cb370bdda393e8b3526fcb9:/ui-commit.c diff --git a/ui-commit.c b/ui-commit.c index ee0e139..b5e3c01 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -35,28 +35,37 @@ void cgit_print_commit(char *hex) } info = cgit_parse_commit(commit); - load_ref_decorations(); + load_ref_decorations(DECORATE_FULL_REFS); html("
| author | "); html_txt(info->author); - html(" "); - html_txt(info->author_email); + if (!ctx.cfg.noplainemail) { + html(" "); + html_txt(info->author_email); + } html(" | "); cgit_print_date(info->author_date, FMT_LONGDATE, ctx.cfg.local_time); html(" |
|---|---|---|
| committer | "); html_txt(info->committer); - html(" "); - html_txt(info->committer_email); + if (!ctx.cfg.noplainemail) { + html(" "); + html_txt(info->committer_email); + } html(" | "); cgit_print_date(info->committer_date, FMT_LONGDATE, ctx.cfg.local_time); html(" |
| commit | "); 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(") | |
| tree | "); tmp = xstrdup(hex); @@ -74,10 +83,10 @@ void cgit_print_commit(char *hex) html(" | |
| parent | " ""); 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(") | |