replace strbuf_expand() with strbuf_expand_step()
commit6f1e2d52797161c7effe4d1388765de3dbd80bbf
authorRené Scharfe <l.s.r@web.de>
Sat, 17 Jun 2023 20:43:17 +0000 (17 22:43 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 18 Jun 2023 19:55:30 +0000 (18 12:55 -0700)
treef00abffad5e1956a300923be11f2ba8ef2f53d1d
parent39dbd49b4138b6cdc9fb73e317d4e9f06df0c5c5
replace strbuf_expand() with strbuf_expand_step()

Avoid the overhead of passing context to a callback function of
strbuf_expand() by using strbuf_expand_step() in a loop instead.  It
requires explicit handling of %% and unrecognized placeholders, but is
simpler, more direct and avoids void pointers.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/cat-file.c
builtin/ls-files.c
builtin/ls-tree.c
daemon.c
pretty.c
strbuf.c
strbuf.h