diff options
author | Lars Hjemli | 2008-04-12 15:53:53 +0200 |
---|---|---|
committer | Lars Hjemli | 2008-04-12 20:00:40 +0200 |
commit | 89aa3c0d0a4c6d9885272602005975b763ea1604 (patch) | |
tree | 4527f91c87d65426e5cd72b1d3e9da2d37ceb6d3 | |
parent | Replace sidebar/logo (diff) | |
download | cgit-89aa3c0d0a4c6d9885272602005975b763ea1604.tar.gz cgit-89aa3c0d0a4c6d9885272602005975b763ea1604.zip |
Include diff in commit view
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-commit.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui-commit.c b/ui-commit.c index 8019e36..c2fafd7 100644 --- a/ui-commit.c +++ b/ui-commit.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "cgit.h" | 9 | #include "cgit.h" |
10 | #include "html.h" | 10 | #include "html.h" |
11 | #include "ui-shared.h" | 11 | #include "ui-shared.h" |
12 | #include "ui-diff.h" | ||
12 | 13 | ||
13 | static int files, slots; | 14 | static int files, slots; |
14 | static int total_adds, total_rems, max_changes; | 15 | static int total_adds, total_rems, max_changes; |
@@ -218,10 +219,11 @@ void cgit_print_commit(char *hex) | |||
218 | print_fileinfo(&items[i]); | 219 | print_fileinfo(&items[i]); |
219 | html("</table>"); | 220 | html("</table>"); |
220 | html("<div class='diffstat-summary'>"); | 221 | html("<div class='diffstat-summary'>"); |
221 | htmlf("%d files changed, %d insertions, %d deletions (", | 222 | htmlf("%d files changed, %d insertions, %d deletions", |
222 | files, total_adds, total_rems); | 223 | files, total_adds, total_rems); |
223 | cgit_diff_link("show diff", NULL, NULL, ctx.qry.head, hex, | 224 | cgit_print_diff(ctx.qry.sha1, |
224 | NULL, NULL); | 225 | sha1_to_hex(commit->parents->item->object.sha1), |
226 | NULL); | ||
225 | html(")</div>"); | 227 | html(")</div>"); |
226 | } | 228 | } |
227 | cgit_free_commitinfo(info); | 229 | cgit_free_commitinfo(info); |