submodule: use strvec_pushf() for --super-prefix
commitcdc3db33ced095ab49c047040da19485bfad2afe
authorRené Scharfe <l.s.r@web.de>
Sun, 23 Oct 2022 06:47:35 +0000 (23 08:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 23 Oct 2022 21:07:32 +0000 (23 14:07 -0700)
tree55ec067082868d654e3e925d0e675ae9c88b1619
parentd5b41391a472dcf9486055fd5b8517f893e88daf
submodule: use strvec_pushf() for --super-prefix

absorb_git_dir_into_superproject() uses a strbuf and strvec_pushl() to
build and add the --super-prefix option and its argument.  Use a single
strvec_pushf() call to add the stuck form instead, which reduces the
code size and avoids a strbuf allocation and release.  The same is
already done in submodule_reset_index() and submodule_move_head().

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c