[PATCH 0/4] strbuf: add and use strbuf_add_uint()
- From
René Scharfe <l.s.r@web.de>
- Date
- May 12, 2026, 11:55 UTC
- Message-ID
- <20260512115603.80780-1-l.s.r@web.de>
Add a function that does the same as strbuf_addf(sb, "%"PRIuMAX, value), only faster, and use it to speed up bulk reporting of size values a bit.
strbuf: add strbuf_add_uint() cat-file: use strbuf_add_uint() ls-files: use strbuf_add_uint() ls-tree: use strbuf_add_uint()
builtin/cat-file.c | 4 ++-- builtin/ls-files.c | 15 +++++++++------ builtin/ls-tree.c | 15 +++++++++------ strbuf.c | 12 ++++++++++++ strbuf.h | 6 ++++++ 5 files changed, 38 insertions(+), 14 deletions(-)
-- 2.54.0