-rw-r--r-- | ui-log.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -144,20 +144,23 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern int argc = 2; int i, columns = 3; if (!tip) tip = ctx.qry.head; argv[1] = disambiguate_ref(tip); - if (grep && pattern && (!strcmp(grep, "grep") || - !strcmp(grep, "author") || - !strcmp(grep, "committer"))) + if (grep && pattern) { + if (!strcmp(grep, "grep") || !strcmp(grep, "author") || + !strcmp(grep, "committer")) argv[argc++] = fmt("--%s=%s", grep, pattern); + if (!strcmp(grep, "range")) + argv[1] = pattern; + } if (path) { argv[argc++] = "--"; argv[argc++] = path; } init_revisions(&rev, NULL); rev.abbrev = DEFAULT_ABBREV; rev.commit_format = CMIT_FMT_DEFAULT; |