|
diff --git a/ui-log.c b/ui-log.c index a41d2b2..a39474b 100644 --- a/ ui-log.c+++ b/ ui-log.c |
|
@@ -34,13 +34,13 @@ void print_commit(struct commit *commit) |
34 | struct commitinfo *info; |
34 | struct commitinfo *info; |
35 | |
35 | |
36 | info = cgit_parse_commit(commit); |
36 | info = cgit_parse_commit(commit); |
37 | html("<tr><td>"); |
37 | html("<tr><td>"); |
38 | cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); |
38 | cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); |
39 | html("</td><td>"); |
39 | html("</td><td>"); |
40 | cgit_commit_link(info->subject, NULL, NULL, cgit_query_head, |
40 | cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, |
41 | sha1_to_hex(commit->object.sha1)); |
41 | sha1_to_hex(commit->object.sha1)); |
42 | if (cgit_repo->enable_log_filecount) { |
42 | if (cgit_repo->enable_log_filecount) { |
43 | files = 0; |
43 | files = 0; |
44 | add_lines = 0; |
44 | add_lines = 0; |
45 | rem_lines = 0; |
45 | rem_lines = 0; |
46 | cgit_diff_commit(commit, inspect_files); |
46 | cgit_diff_commit(commit, inspect_files); |
@@ -64,13 +64,13 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern |
64 | struct commit *commit; |
64 | struct commit *commit; |
65 | const char *argv[] = {NULL, tip, NULL, NULL, NULL}; |
65 | const char *argv[] = {NULL, tip, NULL, NULL, NULL}; |
66 | int argc = 2; |
66 | int argc = 2; |
67 | int i; |
67 | int i; |
68 | |
68 | |
69 | if (!tip) |
69 | if (!tip) |
70 | argv[1] = cgit_query_head; |
70 | argv[1] = ctx.qry.head; |
71 | |
71 | |
72 | if (grep && pattern && (!strcmp(grep, "grep") || |
72 | if (grep && pattern && (!strcmp(grep, "grep") || |
73 | !strcmp(grep, "author") || |
73 | !strcmp(grep, "author") || |
74 | !strcmp(grep, "committer"))) |
74 | !strcmp(grep, "committer"))) |
75 | argv[argc++] = fmt("--%s=%s", grep, pattern); |
75 | argv[argc++] = fmt("--%s=%s", grep, pattern); |
76 | |
76 | |
@@ -120,21 +120,21 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern |
120 | } |
120 | } |
121 | html("</table>\n"); |
121 | html("</table>\n"); |
122 | |
122 | |
123 | if (pager) { |
123 | if (pager) { |
124 | html("<div class='pager'>"); |
124 | html("<div class='pager'>"); |
125 | if (ofs > 0) { |
125 | if (ofs > 0) { |
126 | cgit_log_link("[prev]", NULL, NULL, cgit_query_head, |
126 | cgit_log_link("[prev]", NULL, NULL, ctx.qry.head, |
127 | cgit_query_sha1, cgit_query_path, |
127 | ctx.qry.sha1, ctx.qry.path, |
128 | ofs - cnt, cgit_query_grep, |
128 | ofs - cnt, ctx.qry.grep, |
129 | cgit_query_search); |
129 | ctx.qry.search); |
130 | html(" "); |
130 | html(" "); |
131 | } |
131 | } |
132 | if ((commit = get_revision(&rev)) != NULL) { |
132 | if ((commit = get_revision(&rev)) != NULL) { |
133 | cgit_log_link("[next]", NULL, NULL, cgit_query_head, |
133 | cgit_log_link("[next]", NULL, NULL, ctx.qry.head, |
134 | cgit_query_sha1, cgit_query_path, |
134 | ctx.qry.sha1, ctx.qry.path, |
135 | ofs + cnt, cgit_query_grep, |
135 | ofs + cnt, ctx.qry.grep, |
136 | cgit_query_search); |
136 | ctx.qry.search); |
137 | } |
137 | } |
138 | html("</div>"); |
138 | html("</div>"); |
139 | } |
139 | } |
140 | } |
140 | } |
|