diff options
author | René Scharfe <l.s.r@web.de> | 2020-07-04 14:56:32 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-07 03:38:03 +0200 |
commit | 01faa91cb71cf6f5acdf4e683cce08b5e233cfa8 (patch) | |
tree | 32494e9ccd916e11d6ccd7664113124d9e10fedc /t/t4211-line-log.sh | |
parent | The sixth batch (diff) | |
download | git-01faa91cb71cf6f5acdf4e683cce08b5e233cfa8.tar.xz git-01faa91cb71cf6f5acdf4e683cce08b5e233cfa8.zip |
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 '')
-rwxr-xr-x | t/t4211-line-log.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh index 1428eae262..e186c83250 100755 --- a/t/t4211-line-log.sh +++ b/t/t4211-line-log.sh @@ -240,10 +240,12 @@ test_expect_success 'setup for checking line-log and parent oids' ' EOF git add file.c && test_tick && + first_tick=$test_tick && git commit -m "Add func1() and func2() in file.c" && echo 1 >other-file && git add other-file && + test_tick && git commit -m "Add other-file" && sed -e "s/F1/F1 + 1/" file.c >tmp && @@ -283,4 +285,10 @@ test_expect_success 'parent oids with parent rewriting' ' test_cmp expect actual ' +test_expect_success 'line-log with --before' ' + echo $root_oid >expect && + git log --format=%h --no-patch -L:func2:file.c --before=$first_tick >actual && + test_cmp expect actual +' + test_done |