summaryrefslogtreecommitdiffabout
path: root/ui-diff.c
authorLars Hjemli <hjemli@gmail.com>2008-05-18 19:21:32 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2008-05-18 19:33:30 (UTC)
commit8907f2a03195abec409540ab11293fe748468413 (patch) (side-by-side diff)
tree98b8d269408f6ffcda3a2ebfa6c709565e0f1c2a /ui-diff.c
parent502d57596e645ec91bb9b8ca62833cdb0de4a3b1 (diff)
downloadcgit-8907f2a03195abec409540ab11293fe748468413.zip
cgit-8907f2a03195abec409540ab11293fe748468413.tar.gz
cgit-8907f2a03195abec409540ab11293fe748468413.tar.bz2
Include commit-id in link from diff-stat
This fixes a regression created by fe1230dece81450004d02fa8a470f8dab8f7fdd9, and modifies a test to avoid future regressions. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-diff.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-diff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui-diff.c b/ui-diff.c
index 12e78b1..1c182aa 100644
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -140,16 +140,17 @@ static void inspect_filepair(struct diff_filepair *pair)
void cgit_print_diffstat(const unsigned char *old_sha1,
const unsigned char *new_sha1)
{
int i;
html("<div class='diffstat-header'>Diffstat</div>");
html("<table summary='diffstat' class='diffstat'>");
max_changes = 0;
+ curr_rev = xstrdup(sha1_to_hex(new_sha1));
cgit_diff_tree(old_sha1, new_sha1, inspect_filepair, NULL);
for(i = 0; i<files; i++)
print_fileinfo(&items[i]);
html("</table>");
html("<div class='diffstat-summary'>");
htmlf("%d files changed, %d insertions, %d deletions",
files, total_adds, total_rems);
html("</div>");