summaryrefslogtreecommitdiffabout
path: root/ui-commit.c
authorLars Hjemli <hjemli@gmail.com>2007-05-15 23:16:56 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2007-05-15 23:16:56 (UTC)
commitdff894d12953a8a3cd7cdca2357771212a2f57d6 (patch) (unidiff)
tree042f1fbc0594d61d97721167197506760847ce2a /ui-commit.c
parentf9ff7df613b4ee86fe5914c4ae3400650882c03d (diff)
downloadcgit-dff894d12953a8a3cd7cdca2357771212a2f57d6.zip
cgit-dff894d12953a8a3cd7cdca2357771212a2f57d6.tar.gz
cgit-dff894d12953a8a3cd7cdca2357771212a2f57d6.tar.bz2
Add link to commitdiff below diffstat
This link is a lot easier to locate than the links to the right of the parent entries. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-commit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-commit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui-commit.c b/ui-commit.c
index 93eb8fd..ff1fad3 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -221,6 +221,7 @@ void cgit_print_commit(const char *hex)
221 html_txt(info->msg); 221 html_txt(info->msg);
222 html("</div>"); 222 html("</div>");
223 if (!(commit->parents && commit->parents->next && commit->parents->next->next)) { 223 if (!(commit->parents && commit->parents->next && commit->parents->next->next)) {
224 html("<div class='diffstat-header'>Diffstat</div>");
224 html("<table class='diffstat'>"); 225 html("<table class='diffstat'>");
225 max_changes = 0; 226 max_changes = 0;
226 cgit_diff_commit(commit, inspect_filepair); 227 cgit_diff_commit(commit, inspect_filepair);
@@ -228,8 +229,11 @@ void cgit_print_commit(const char *hex)
228 print_fileinfo(&items[i]); 229 print_fileinfo(&items[i]);
229 html("</table>"); 230 html("</table>");
230 html("<div class='diffstat-summary'>"); 231 html("<div class='diffstat-summary'>");
231 htmlf("%d files changed, %d insertions, %d deletions\n", 232 htmlf("%d files changed, %d insertions, %d deletions (",
232 files, total_adds, total_rems); 233 files, total_adds, total_rems);
234 query = fmt("h=%s", hex);
235 html_link_open(cgit_pageurl(cgit_query_repo, "diff", query), NULL, NULL);
236 html("show diff</a>)");
233 html("</div>"); 237 html("</div>");
234 } 238 }
235 cgit_free_commitinfo(info); 239 cgit_free_commitinfo(info);