blame: fix indent of line numbers
Correct the calculation of the number of digits for line counts of the form 10^n-1 (9, 99, ...) in lineno_width(). This makes blame stop printing an extra space before the line numbers of files with that many total lines. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
4a2284b999
commit
00fb3d214c
@ -1772,7 +1772,7 @@ static int lineno_width(int lines)
|
||||
{
|
||||
int i, width;
|
||||
|
||||
for (width = 1, i = 10; i <= lines + 1; width++)
|
||||
for (width = 1, i = 10; i <= lines; width++)
|
||||
i *= 10;
|
||||
return width;
|
||||
}
|
||||
|
Reference in New Issue
Block a user