diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2010-03-13 11:25:12 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-13 12:04:17 -0800 |
commit | 00fb3d214cbb867f45de0084e6b844445e076dce (patch) | |
tree | 13e8c1e8d5c06d20bf1b0ee7383e79855d8b0331 /builtin-blame.c | |
parent | 4a2284b9997400d46b439a9cd272ba16cbf4f377 (diff) | |
download | git-00fb3d214cbb867f45de0084e6b844445e076dce.tar.gz |
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>
Diffstat (limited to 'builtin-blame.c')
-rw-r--r-- | builtin-blame.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |