]> git.ipfire.org Git - thirdparty/git.git/commit
blame: report correct number of lines in progress when using ranges
authorEdmundo Carmona Antoranz <eantoranz@gmail.com>
Wed, 6 Apr 2022 18:13:20 +0000 (20:13 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Apr 2022 20:29:59 +0000 (13:29 -0700)
commite5f5d7d42effb1d0d404897ac782783f742e9daa
treef6c7fe3f53ac77de4a59ff5872c5cca5e7bd3a3e
parent4c53a8c20f8984adb226293a3ffd7b88c3f4ac1a
blame: report correct number of lines in progress when using ranges

When using ranges, use the range sizes as the limit for progress
instead of the size of the full file.

Before:
$ git blame --progress builtin/blame.c > /dev/null
Blaming lines: 100% (1210/1210), done.
$ git blame --progress -L 100,120 -L 200,300 builtin/blame.c > /dev/null
Blaming lines:  10% (122/1210), done.
$

After:
$ ./git blame --progress builtin/blame.c > /dev/null
Blaming lines: 100% (1210/1210), done.
$ ./git blame --progress -L 100,120 -L 200,300 builtin/blame.c > /dev/null
Blaming lines: 100% (122/122), done.
$

Signed-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/blame.c
t/annotate-tests.sh