diff options
author | René Scharfe <l.s.r@web.de> | 2024-08-03 14:33:24 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-05 08:59:40 -0700 |
commit | 0c4d5aa22d65fb395962bdc0165840f66b7b91ea (patch) | |
tree | e89da1a1fe6a4eb884b77ef740c30b2e295536aa /commit.h | |
parent | 337b4d400023d22207bcc3c29e9ebab31bf96fc2 (diff) |
log-tree: use decimal_width()
Reduce code duplication by calling decimal_width() to count the digits
in the number of commits instead of calculating it locally.
It also has the advantage of returning int, which is the exact type
expected by the printf()-like function strbuf_addf() for field width
arguments.
Additionally, decimal_width() supports numbers bigger than 1410065407,
which is (hopefully) just a theoretical advantage.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions