]> gitweb.ps.run Git - ps-cgit/commitdiff
Merge branch 'lh/range-search'
authorLars Hjemli <hjemli@gmail.com>
Tue, 22 Jun 2010 14:16:24 +0000 (16:16 +0200)
committerLars Hjemli <hjemli@gmail.com>
Tue, 22 Jun 2010 14:16:24 +0000 (16:16 +0200)
ui-log.c
ui-shared.c

index 5eb5c813beedaebf7bb0921f20c892c0556f9628..33ec8a95f5712d09a1151f69b91cee9a6a91cb75 100644 (file)
--- a/ui-log.c
+++ b/ui-log.c
@@ -149,10 +149,13 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
 
        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++] = "--";
index c99bcecdf7905fa373d8839d83e3935d9c30faeb..c398d7aaf85a4ce5dfedbccc97bc844713dd44bf 100644 (file)
@@ -830,6 +830,7 @@ void cgit_print_pageheader(struct cgit_context *ctx)
                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);