summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2020-07-04 12:56:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-07-07 01:38:03 (GMT)
commit01faa91cb71cf6f5acdf4e683cce08b5e233cfa8 (patch)
tree32494e9ccd916e11d6ccd7664113124d9e10fedc /revision.c
parenta08a83db2bf27f015bec9a435f6d73e223c21c5e (diff)
downloadgit-01faa91cb71cf6f5acdf4e683cce08b5e233cfa8.zip
git-01faa91cb71cf6f5acdf4e683cce08b5e233cfa8.tar.gz
git-01faa91cb71cf6f5acdf4e683cce08b5e233cfa8.tar.bz2
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>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index ebb4d2a..3bdc1bb 100644
--- a/revision.c
+++ b/revision.c
@@ -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;