aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui-log.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/ui-log.c b/ui-log.c
index 8add66a..2e6e9d6 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -100,11 +100,10 @@ void print_commit(struct commit *commit, struct rev_info *revs)
100 struct strbuf graphbuf = STRBUF_INIT; 100 struct strbuf graphbuf = STRBUF_INIT;
101 struct strbuf msgbuf = STRBUF_INIT; 101 struct strbuf msgbuf = STRBUF_INIT;
102 102
103 if (ctx.repo->enable_log_filecount) { 103 if (ctx.repo->enable_log_filecount)
104 cols++;
105 if (ctx.repo->enable_log_linecount)
104 cols++; 106 cols++;
105 if (ctx.repo->enable_log_linecount)
106 cols++;
107 }
108 107
109 if (revs->graph) { 108 if (revs->graph) {
110 /* Advance graph until current commit */ 109 /* Advance graph until current commit */
@@ -179,18 +178,18 @@ void print_commit(struct commit *commit, struct rev_info *revs)
179 html_link_close(); 178 html_link_close();
180 } 179 }
181 180
182 if (ctx.repo->enable_log_filecount) { 181 if (ctx.repo->enable_log_filecount || ctx.repo->enable_log_linecount) {
183 files = 0; 182 files = 0;
184 add_lines = 0; 183 add_lines = 0;
185 rem_lines = 0; 184 rem_lines = 0;
186 cgit_diff_commit(commit, inspect_files, ctx.qry.vpath); 185 cgit_diff_commit(commit, inspect_files, ctx.qry.vpath);
187 html("</td><td>");
188 htmlf("%d", files);
189 if (ctx.repo->enable_log_linecount) {
190 html("</td><td>");
191 htmlf("-%d/+%d", rem_lines, add_lines);
192 }
193 } 186 }
187
188 if (ctx.repo->enable_log_filecount)
189 htmlf("</td><td>%d", files);
190 if (ctx.repo->enable_log_linecount)
191 htmlf("</td><td>-%d/+%d", rem_lines, add_lines);
192
194 html("</td></tr>\n"); 193 html("</td></tr>\n");
195 194
196 if (revs->graph || ctx.qry.showmsg) { /* Print a second table row */ 195 if (revs->graph || ctx.qry.showmsg) { /* Print a second table row */
@@ -379,10 +378,10 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
379 if (ctx.repo->enable_log_filecount) { 378 if (ctx.repo->enable_log_filecount) {
380 html("<th class='left'>Files</th>"); 379 html("<th class='left'>Files</th>");
381 columns++; 380 columns++;
382 if (ctx.repo->enable_log_linecount) { 381 }
383 html("<th class='left'>Lines</th>"); 382 if (ctx.repo->enable_log_linecount) {
384 columns++; 383 html("<th class='left'>Lines</th>");
385 } 384 columns++;
386 } 385 }
387 html("</tr>\n"); 386 html("</tr>\n");
388 387