ui-log.c: allow commit range as search expression Inspired-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 19 Jun 2010 14:32:37 +0200
2 files changed,
8 insertions(+),
4 deletions(-)
M
ui-log.c
→
ui-log.c
@@ -146,10 +146,13 @@ 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++] = "--";