summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ui-log.c11
-rw-r--r--ui-shared.c1
2 files changed, 8 insertions, 4 deletions
diff --git a/ui-log.c b/ui-log.c
index 5eb5c81..33ec8a9 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -146,16 +146,19 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
if (!tip)
tip = ctx.qry.head;
argv[1] = disambiguate_ref(tip);
- if (grep && pattern && (!strcmp(grep, "grep") ||
- !strcmp(grep, "author") ||
- !strcmp(grep, "committer")))
- argv[argc++] = fmt("--%s=%s", grep, pattern);
+ 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);
diff --git a/ui-shared.c b/ui-shared.c
index c99bcec..c398d7a 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -827,12 +827,13 @@ void cgit_print_pageheader(struct cgit_context *ctx)
html("'>\n");
cgit_add_hidden_formfields(1, 0, "log");
html("<select name='qt'>\n");
html_option("grep", "log msg", ctx->qry.grep);
html_option("author", "author", ctx->qry.grep);
html_option("committer", "committer", ctx->qry.grep);
+ html_option("range", "range", ctx->qry.grep);
html("</select>\n");
html("<input class='txt' type='text' size='10' name='q' value='");
html_attr(ctx->qry.search);
html("'/>\n");
html("<input type='submit' value='search'/>\n");
html("</form>\n");