From 80e03855413c7ac3727df572d44131656e467426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Fri, 21 Sep 2018 17:57:34 +0200 Subject: line-range.c: remove implicit dependency on the_index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- line-log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'line-log.c') diff --git a/line-log.c b/line-log.c index 35adf199a5..d1d429d738 100644 --- a/line-log.c +++ b/line-log.c @@ -574,7 +574,7 @@ parse_lines(struct repository *r, struct commit *commit, long begin = 0, end = 0; long anchor; - name_part = skip_range_arg(item->string); + name_part = skip_range_arg(item->string, r->index); if (!name_part || *name_part != ':' || !name_part[1]) die("-L argument not 'start,end:file' or ':funcname:file': %s", item->string); @@ -599,7 +599,7 @@ parse_lines(struct repository *r, struct commit *commit, if (parse_range_arg(range_part, nth_line, &cb_data, lines, anchor, &begin, &end, - full_name)) + full_name, r->index)) die("malformed -L argument '%s'", range_part); if ((!lines && (begin || end)) || lines < begin) die("file %s has only %lu lines", name_part, lines); -- cgit v1.2.3