Include commit-id in link from diff-stat

This fixes a regression created by fe1230dece,
and modifies a test to avoid future regressions.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
Lars Hjemli 2008-05-18 21:21:32 +02:00
父節點 502d57596e
當前提交 8907f2a031
共有 2 個文件被更改,包括 2 次插入1 次删除

查看文件

@ -26,7 +26,7 @@ run_test 'get root commit' '
'
run_test 'root commit contains diffstat' '
grep "<a href=./foo/diff/file-1.>file-1</a>" trash/tmp
grep "<a href=./foo/diff/file-1.id=[0-9a-f]\{40\}.>file-1</a>" trash/tmp
'
run_test 'root commit contains diff' '

查看文件

@ -145,6 +145,7 @@ void cgit_print_diffstat(const unsigned char *old_sha1,
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]);