|
diff --git a/ui-log.c b/ui-log.c index bc0c02c..b9771fa 100644 --- a/ ui-log.c+++ b/ ui-log.c |
|
@@ -149,33 +149,33 @@ static const char *disambiguate_ref(const char *ref) |
149 | } |
149 | } |
150 | |
150 | |
151 | void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern, |
151 | void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern, |
152 | char *path, int pager) |
152 | char *path, int pager) |
153 | { |
153 | { |
154 | struct rev_info rev; |
154 | struct rev_info rev; |
155 | struct commit *commit; |
155 | struct commit *commit; |
156 | const char *argv[] = {NULL, NULL, NULL, NULL, NULL}; |
156 | const char *argv[] = {NULL, NULL, NULL, NULL, NULL}; |
157 | int argc = 2; |
157 | int argc = 2; |
158 | int i, columns = 3; |
158 | int i, columns = 3; |
159 | |
159 | |
160 | if (!tip) |
160 | if (!tip) |
161 | tip = ctx.qry.head; |
161 | tip = ctx.qry.head; |
162 | |
162 | |
163 | argv[1] = disambiguate_ref(tip); |
163 | argv[1] = disambiguate_ref(tip); |
164 | |
164 | |
165 | if (grep && pattern) { |
165 | if (grep && pattern && *pattern) { |
166 | if (!strcmp(grep, "grep") || !strcmp(grep, "author") || |
166 | if (!strcmp(grep, "grep") || !strcmp(grep, "author") || |
167 | !strcmp(grep, "committer")) |
167 | !strcmp(grep, "committer")) |
168 | argv[argc++] = fmt("--%s=%s", grep, pattern); |
168 | argv[argc++] = fmt("--%s=%s", grep, pattern); |
169 | if (!strcmp(grep, "range")) |
169 | if (!strcmp(grep, "range")) |
170 | argv[1] = pattern; |
170 | argv[1] = pattern; |
171 | } |
171 | } |
172 | |
172 | |
173 | if (path) { |
173 | if (path) { |
174 | argv[argc++] = "--"; |
174 | argv[argc++] = "--"; |
175 | argv[argc++] = path; |
175 | argv[argc++] = path; |
176 | } |
176 | } |
177 | init_revisions(&rev, NULL); |
177 | init_revisions(&rev, NULL); |
178 | rev.abbrev = DEFAULT_ABBREV; |
178 | rev.abbrev = DEFAULT_ABBREV; |
179 | rev.commit_format = CMIT_FMT_DEFAULT; |
179 | rev.commit_format = CMIT_FMT_DEFAULT; |
180 | rev.verbose_header = 1; |
180 | rev.verbose_header = 1; |
181 | rev.show_root_diff = 0; |
181 | rev.show_root_diff = 0; |
|