]> git.ipfire.org Git - thirdparty/git.git/commit
repo: factor out field printing to dedicated function
authorLucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Tue, 18 Nov 2025 20:37:03 +0000 (17:37 -0300)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Nov 2025 21:29:10 +0000 (13:29 -0800)
commitfd7d79d068dd14a4d7a4a93f7bfd31cf24020aec
treeb24500606a0ded33e8f714f15ee07a18e025e47d
parent9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed
repo: factor out field printing to dedicated function

Move the field printing in git-repo-info to a new function called
`print_field`, allowing it to be called by functions other than
`print_fields`.

Also change its use of quote_c_style() helper to output directly to
the standard output stream, instead of taking a result in a strbuf
and then printing it outselves.

Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/repo.c