From 00fb3d214cbb867f45de0084e6b844445e076dce Mon Sep 17 00:00:00 2001 From: René Scharfe Date: Sat, 13 Mar 2010 11:25:12 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- builtin-blame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-blame.c') diff --git a/builtin-blame.c b/builtin-blame.c index 10f7eacf6e..fc1586350f 100644 --- a/builtin-blame.c +++ b/builtin-blame.c @@ -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; } -- cgit v1.2.3