From 815834e9aa6148b7815b9aea7db5d44640a4383a Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Tue, 6 Aug 2013 09:59:41 -0400 Subject: line-range: teach -L/RE/ to search relative to anchor point Range specification -L/RE/ for blame/log unconditionally begins searching at line one. Mailing list discussion [1] suggests that, in the presence of multiple -L options, -L/RE/ should search relative to the endpoint of the previous -L range, if any. Teach the parsing machinery underlying blame's and log's -L options to accept a start point for -L/RE/ searches. Follow-up patches will upgrade blame and log to take advantage of this ability. [1]: http://thread.gmane.org/gmane.comp.version-control.git/229755/focus=229966 Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- builtin/blame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/blame.c') diff --git a/builtin/blame.c b/builtin/blame.c index 2f4d9e2d75..7b084d8445 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2479,7 +2479,7 @@ parse_done: for (range_i = 0; range_i < range_list.nr; ++range_i) { long bottom, top; if (parse_range_arg(range_list.items[range_i].string, - nth_line_cb, &sb, lno, + nth_line_cb, &sb, lno, 1, &bottom, &top, sb.path)) usage(blame_usage); if (lno < top || ((lno || bottom) && lno < bottom)) -- cgit v1.2.1