]> git.ipfire.org Git - thirdparty/git.git/commit - pager.c
make lineno_width() from blame reusable for others
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 12 Feb 2012 14:16:20 +0000 (15:16 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Feb 2012 00:16:19 +0000 (16:16 -0800)
commitec7ff5ba272b565ed093a98dc13dd5cd26aeac92
tree9039325114378101cc6f922337a9ab33e3adb3bf
parent58d4203aa617293d1dc3746a1ea33d84eb766e0f
make lineno_width() from blame reusable for others

builtin/blame.c has a helper function to compute how many columns
we need to show a line-number, whose implementation is reusable as
a more generic helper function to count the number of columns
necessary to show any cardinal number.

Rename it to decimal_width(), move it to pager.c and export it for
use by future callers.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/blame.c
cache.h
pager.c