revision: disable min_age optimization with line-log

If one of the options --before, --min-age or --until is given,
limit_list() filters out younger commits early on.  Line-log needs all
those commits to trace the movement of line ranges, though.  Skip this
optimization if both are used together.

Reported-by: Мария Долгополова <dolgopolovamariia@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe
2020-07-04 14:56:32 +02:00
committed by Junio C Hamano
parent a08a83db2b
commit 01faa91cb7
2 changed files with 10 additions and 1 deletions

View File

@ -1410,7 +1410,8 @@ static int limit_list(struct rev_info *revs)
continue;
break;
}
if (revs->min_age != -1 && (commit->date > revs->min_age))
if (revs->min_age != -1 && (commit->date > revs->min_age) &&
!revs->line_level_traverse)
continue;
date = commit->date;
p = &commit_list_insert(commit, p)->next;