summaryrefslogtreecommitdiffabout
path: root/ui-log.c
Unidiff
Diffstat (limited to 'ui-log.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-log.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui-log.c b/ui-log.c
index 72e2a4b..e1d324d 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -1,33 +1,34 @@
1/* ui-log.c: functions for log output 1/* ui-log.c: functions for log output
2 * 2 *
3 * Copyright (C) 2006 Lars Hjemli 3 * Copyright (C) 2006 Lars Hjemli
4 * 4 *
5 * Licensed under GNU General Public License v2 5 * Licensed under GNU General Public License v2
6 * (see COPYING for full license text) 6 * (see COPYING for full license text)
7 */ 7 */
8 8
9#include "cgit.h" 9#include "cgit.h"
10#include "html.h"
10 11
11int files, add_lines, rem_lines; 12int files, add_lines, rem_lines;
12 13
13void count_lines(char *line, int size) 14void count_lines(char *line, int size)
14{ 15{
15 if (size <= 0) 16 if (size <= 0)
16 return; 17 return;
17 18
18 if (line[0] == '+') 19 if (line[0] == '+')
19 add_lines++; 20 add_lines++;
20 21
21 else if (line[0] == '-') 22 else if (line[0] == '-')
22 rem_lines++; 23 rem_lines++;
23} 24}
24 25
25void inspect_files(struct diff_filepair *pair) 26void inspect_files(struct diff_filepair *pair)
26{ 27{
27 files++; 28 files++;
28 if (ctx.repo->enable_log_linecount) 29 if (ctx.repo->enable_log_linecount)
29 cgit_diff_files(pair->one->sha1, pair->two->sha1, count_lines); 30 cgit_diff_files(pair->one->sha1, pair->two->sha1, count_lines);
30} 31}
31 32
32void print_commit(struct commit *commit) 33void print_commit(struct commit *commit)
33{ 34{