aboutsummaryrefslogtreecommitdiffstats
path: root/ui-log.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-log.c')
-rw-r--r--ui-log.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/ui-log.c b/ui-log.c
index 15ed6a3..4a295bd 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -99,11 +99,10 @@ void print_commit(struct commit *commit, struct rev_info *revs)
99 struct strbuf graphbuf = STRBUF_INIT; 99 struct strbuf graphbuf = STRBUF_INIT;
100 struct strbuf msgbuf = STRBUF_INIT; 100 struct strbuf msgbuf = STRBUF_INIT;
101 101
102 if (ctx.repo->enable_log_filecount) { 102 if (ctx.repo->enable_log_filecount)
103 cols++;
104 if (ctx.repo->enable_log_linecount)
103 cols++; 105 cols++;
104 if (ctx.repo->enable_log_linecount)
105 cols++;
106 }
107 106
108 if (revs->graph) { 107 if (revs->graph) {
109 /* Advance graph until current commit */ 108 /* Advance graph until current commit */
@@ -170,18 +169,18 @@ void print_commit(struct commit *commit, struct rev_info *revs)
170 cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); 169 cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE);
171 } 170 }
172 171
173 if (ctx.repo->enable_log_filecount) { 172 if (ctx.repo->enable_log_filecount || ctx.repo->enable_log_linecount) {
174 files = 0; 173 files = 0;
175 add_lines = 0; 174 add_lines = 0;
176 rem_lines = 0; 175 rem_lines = 0;
177 cgit_diff_commit(commit, inspect_files, ctx.qry.vpath); 176 cgit_diff_commit(commit, inspect_files, ctx.qry.vpath);
178 html("</td><td>");
179 htmlf("%d", files);
180 if (ctx.repo->enable_log_linecount) {
181 html("</td><td>");
182 htmlf("-%d/+%d", rem_lines, add_lines);
183 }
184 } 177 }
178
179 if (ctx.repo->enable_log_filecount)
180 htmlf("</td><td>%d", files);
181 if (ctx.repo->enable_log_linecount)
182 htmlf("</td><td>-%d/+%d", rem_lines, add_lines);
183
185 html("</td></tr>\n"); 184 html("</td></tr>\n");
186 185
187 if (revs->graph || ctx.qry.showmsg) { /* Print a second table row */ 186 if (revs->graph || ctx.qry.showmsg) { /* Print a second table row */
@@ -370,10 +369,10 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
370 if (ctx.repo->enable_log_filecount) { 369 if (ctx.repo->enable_log_filecount) {
371 html("<th class='left'>Files</th>"); 370 html("<th class='left'>Files</th>");
372 columns++; 371 columns++;
373 if (ctx.repo->enable_log_linecount) { 372 }
374 html("<th class='left'>Lines</th>"); 373 if (ctx.repo->enable_log_linecount) {
375 columns++; 374 html("<th class='left'>Lines</th>");
376 } 375 columns++;
377 } 376 }
378 html("</tr>\n"); 377 html("</tr>\n");
379 378