summaryrefslogtreecommitdiff
path: root/builtin-blame.c
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2010-03-13 10:25:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-03-13 20:04:17 (GMT)
commit00fb3d214cbb867f45de0084e6b844445e076dce (patch)
tree13e8c1e8d5c06d20bf1b0ee7383e79855d8b0331 /builtin-blame.c
parent4a2284b9997400d46b439a9cd272ba16cbf4f377 (diff)
downloadgit-00fb3d214cbb867f45de0084e6b844445e076dce.zip
git-00fb3d214cbb867f45de0084e6b844445e076dce.tar.gz
git-00fb3d214cbb867f45de0084e6b844445e076dce.tar.bz2
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-blame.c b/builtin-blame.c
index 10f7eac..fc15863 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;
}