summaryrefslogtreecommitdiffabout
path: root/ui-log.c
authorLars Hjemli <hjemli@gmail.com>2010-09-19 17:00:05 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2010-09-19 17:00:05 (UTC)
commita9d6e6e695da6c6ed7f4bb32630ab2f3d9314806 (patch) (unidiff)
treede8271ebfabd244437cd68021c8af86391afb9bd /ui-log.c
parent536c7a1eb201b44b9266babe087cb6f2b75e4a7f (diff)
parentd187b98557d91b874836f286b955ba76ab26fb02 (diff)
downloadcgit-a9d6e6e695da6c6ed7f4bb32630ab2f3d9314806.zip
cgit-a9d6e6e695da6c6ed7f4bb32630ab2f3d9314806.tar.gz
cgit-a9d6e6e695da6c6ed7f4bb32630ab2f3d9314806.tar.bz2
Merge branch 'ml/bugfix'
Diffstat (limited to 'ui-log.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-log.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui-log.c b/ui-log.c
index 0536b23..41b5225 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -199,55 +199,54 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
199 ctx.qry.search, ctx.qry.showmsg ? 0 : 1); 199 ctx.qry.search, ctx.qry.showmsg ? 0 : 1);
200 html(")"); 200 html(")");
201 } 201 }
202 html("</th><th class='left'>Author</th>"); 202 html("</th><th class='left'>Author</th>");
203 if (ctx.repo->enable_log_filecount) { 203 if (ctx.repo->enable_log_filecount) {
204 html("<th class='left'>Files</th>"); 204 html("<th class='left'>Files</th>");
205 columns++; 205 columns++;
206 if (ctx.repo->enable_log_linecount) { 206 if (ctx.repo->enable_log_linecount) {
207 html("<th class='left'>Lines</th>"); 207 html("<th class='left'>Lines</th>");
208 columns++; 208 columns++;
209 } 209 }
210 } 210 }
211 html("</tr>\n"); 211 html("</tr>\n");
212 212
213 if (ofs<0) 213 if (ofs<0)
214 ofs = 0; 214 ofs = 0;
215 215
216 for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; i++) { 216 for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; i++) {
217 free(commit->buffer); 217 free(commit->buffer);
218 commit->buffer = NULL; 218 commit->buffer = NULL;
219 free_commit_list(commit->parents); 219 free_commit_list(commit->parents);
220 commit->parents = NULL; 220 commit->parents = NULL;
221 } 221 }
222 222
223 for (i = 0; i < cnt && (commit = get_revision(&rev)) != NULL; i++) { 223 for (i = 0; i < cnt && (commit = get_revision(&rev)) != NULL; i++) {
224 print_commit(commit); 224 print_commit(commit);
225 free(commit->buffer); 225 free(commit->buffer);
226 commit->buffer = NULL; 226 commit->buffer = NULL;
227 free_commit_list(commit->parents); 227 free_commit_list(commit->parents);
228 commit->parents = NULL; 228 commit->parents = NULL;
229 } 229 }
230 if (pager) { 230 if (pager) {
231 htmlf("</table><div class='pager'>", 231 html("</table><div class='pager'>");
232 columns);
233 if (ofs > 0) { 232 if (ofs > 0) {
234 cgit_log_link("[prev]", NULL, NULL, ctx.qry.head, 233 cgit_log_link("[prev]", NULL, NULL, ctx.qry.head,
235 ctx.qry.sha1, ctx.qry.vpath, 234 ctx.qry.sha1, ctx.qry.vpath,
236 ofs - cnt, ctx.qry.grep, 235 ofs - cnt, ctx.qry.grep,
237 ctx.qry.search, ctx.qry.showmsg); 236 ctx.qry.search, ctx.qry.showmsg);
238 html("&nbsp;"); 237 html("&nbsp;");
239 } 238 }
240 if ((commit = get_revision(&rev)) != NULL) { 239 if ((commit = get_revision(&rev)) != NULL) {
241 cgit_log_link("[next]", NULL, NULL, ctx.qry.head, 240 cgit_log_link("[next]", NULL, NULL, ctx.qry.head,
242 ctx.qry.sha1, ctx.qry.vpath, 241 ctx.qry.sha1, ctx.qry.vpath,
243 ofs + cnt, ctx.qry.grep, 242 ofs + cnt, ctx.qry.grep,
244 ctx.qry.search, ctx.qry.showmsg); 243 ctx.qry.search, ctx.qry.showmsg);
245 } 244 }
246 html("</div>"); 245 html("</div>");
247 } else if ((commit = get_revision(&rev)) != NULL) { 246 } else if ((commit = get_revision(&rev)) != NULL) {
248 html("<tr class='nohover'><td colspan='3'>"); 247 html("<tr class='nohover'><td colspan='3'>");
249 cgit_log_link("[...]", NULL, NULL, ctx.qry.head, NULL, 248 cgit_log_link("[...]", NULL, NULL, ctx.qry.head, NULL,
250 ctx.qry.vpath, 0, NULL, NULL, ctx.qry.showmsg); 249 ctx.qry.vpath, 0, NULL, NULL, ctx.qry.showmsg);
251 html("</td></tr>\n"); 250 html("</td></tr>\n");
252 } 251 }
253} 252}