|
diff --git a/ui-log.c b/ui-log.c index 3202848..ba2ab03 100644 --- a/ ui-log.c+++ b/ ui-log.c |
|
@@ -13,35 +13,40 @@ |
13 | int files, add_lines, rem_lines; |
13 | int files, add_lines, rem_lines; |
14 | |
14 | |
15 | void count_lines(char *line, int size) |
15 | void count_lines(char *line, int size) |
16 | { |
16 | { |
17 | if (size <= 0) |
17 | if (size <= 0) |
18 | return; |
18 | return; |
19 | |
19 | |
20 | if (line[0] == '+') |
20 | if (line[0] == '+') |
21 | add_lines++; |
21 | add_lines++; |
22 | |
22 | |
23 | else if (line[0] == '-') |
23 | else if (line[0] == '-') |
24 | rem_lines++; |
24 | rem_lines++; |
25 | } |
25 | } |
26 | |
26 | |
27 | void inspect_files(struct diff_filepair *pair) |
27 | void inspect_files(struct diff_filepair *pair) |
28 | { |
28 | { |
| |
29 | unsigned long old_size = 0; |
| |
30 | unsigned long new_size = 0; |
| |
31 | int binary = 0; |
| |
32 | |
29 | files++; |
33 | files++; |
30 | if (ctx.repo->enable_log_linecount) |
34 | if (ctx.repo->enable_log_linecount) |
31 | cgit_diff_files(pair->one->sha1, pair->two->sha1, count_lines); |
35 | cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size, |
| |
36 | &new_size, &binary, count_lines); |
32 | } |
37 | } |
33 | |
38 | |
34 | void show_commit_decorations(struct commit *commit) |
39 | void show_commit_decorations(struct commit *commit) |
35 | { |
40 | { |
36 | struct name_decoration *deco; |
41 | struct name_decoration *deco; |
37 | static char buf[1024]; |
42 | static char buf[1024]; |
38 | |
43 | |
39 | buf[sizeof(buf) - 1] = 0; |
44 | buf[sizeof(buf) - 1] = 0; |
40 | deco = lookup_decoration(&name_decoration, &commit->object); |
45 | deco = lookup_decoration(&name_decoration, &commit->object); |
41 | while (deco) { |
46 | while (deco) { |
42 | if (!prefixcmp(deco->name, "refs/heads/")) { |
47 | if (!prefixcmp(deco->name, "refs/heads/")) { |
43 | strncpy(buf, deco->name + 11, sizeof(buf) - 1); |
48 | strncpy(buf, deco->name + 11, sizeof(buf) - 1); |
44 | cgit_log_link(buf, NULL, "branch-deco", buf, NULL, NULL, |
49 | cgit_log_link(buf, NULL, "branch-deco", buf, NULL, NULL, |
45 | 0, NULL, NULL, ctx.qry.showmsg); |
50 | 0, NULL, NULL, ctx.qry.showmsg); |
46 | } |
51 | } |
47 | else if (!prefixcmp(deco->name, "tag: refs/tags/")) { |
52 | else if (!prefixcmp(deco->name, "tag: refs/tags/")) { |
|