summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2024-02-25 12:39:44 +0100
committerJunio C Hamano <gitster@pobox.com>2024-02-26 09:35:40 -0800
commit8d25663d704d1216d2fd5db5fd3aa431b8c58268 (patch)
tree384ea573a038437501a38a4a6195ae52d21ef4ea /commit.c
parent3c2a3fdc388747b9eaf4a4a4f2035c1c9ddb26d0 (diff)
mem-pool: add mem_pool_strfmt()
Add a function for building a string, printf style, using a memory pool. It uses the free space in the current block in the first attempt. If that suffices then the result can already be used without copying or reformatting. For strings that are significantly shorter on average than the block size (ca. 1 MiB by default) this is the case most of the time, leading to a better perfomance than a solution that doesn't access mem-pool internals. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions