author | Lars Hjemli <hjemli@gmail.com> | 2010-09-19 17:00:05 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-09-19 17:00:05 (UTC) |
commit | a9d6e6e695da6c6ed7f4bb32630ab2f3d9314806 (patch) (unidiff) | |
tree | de8271ebfabd244437cd68021c8af86391afb9bd /ui-log.c | |
parent | 536c7a1eb201b44b9266babe087cb6f2b75e4a7f (diff) | |
parent | d187b98557d91b874836f286b955ba76ab26fb02 (diff) | |
download | cgit-a9d6e6e695da6c6ed7f4bb32630ab2f3d9314806.zip cgit-a9d6e6e695da6c6ed7f4bb32630ab2f3d9314806.tar.gz cgit-a9d6e6e695da6c6ed7f4bb32630ab2f3d9314806.tar.bz2 |
Merge branch 'ml/bugfix'
-rw-r--r-- | ui-log.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -183,71 +183,70 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern | |||
183 | load_ref_decorations(DECORATE_FULL_REFS); | 183 | load_ref_decorations(DECORATE_FULL_REFS); |
184 | rev.show_decorations = 1; | 184 | rev.show_decorations = 1; |
185 | rev.grep_filter.regflags |= REG_ICASE; | 185 | rev.grep_filter.regflags |= REG_ICASE; |
186 | compile_grep_patterns(&rev.grep_filter); | 186 | compile_grep_patterns(&rev.grep_filter); |
187 | prepare_revision_walk(&rev); | 187 | prepare_revision_walk(&rev); |
188 | 188 | ||
189 | if (pager) | 189 | if (pager) |
190 | html("<table class='list nowrap'>"); | 190 | html("<table class='list nowrap'>"); |
191 | 191 | ||
192 | html("<tr class='nohover'><th class='left'>Age</th>" | 192 | html("<tr class='nohover'><th class='left'>Age</th>" |
193 | "<th class='left'>Commit message"); | 193 | "<th class='left'>Commit message"); |
194 | if (pager) { | 194 | if (pager) { |
195 | html(" ("); | 195 | html(" ("); |
196 | cgit_log_link(ctx.qry.showmsg ? "Collapse" : "Expand", NULL, | 196 | cgit_log_link(ctx.qry.showmsg ? "Collapse" : "Expand", NULL, |
197 | NULL, ctx.qry.head, ctx.qry.sha1, | 197 | NULL, ctx.qry.head, ctx.qry.sha1, |
198 | ctx.qry.vpath, ctx.qry.ofs, ctx.qry.grep, | 198 | ctx.qry.vpath, ctx.qry.ofs, ctx.qry.grep, |
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(" "); | 237 | html(" "); |
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 | } |