]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/remote.c: add and use SHOW_INFO_INIT
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 1 Oct 2021 10:27:35 +0000 (12:27 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 1 Oct 2021 21:22:51 +0000 (14:22 -0700)
commit0000e81811bcbdc44339d03ae772650b98c26ed9
treeb002d4347338784fddb31b5c35ed1699343e7dab
parent0bc7787ca9ea123e28769f728d77261cad1f1557
builtin/remote.c: add and use SHOW_INFO_INIT

In the preceding commit we introduced REF_STATES_INIT, but did not
change the "struct show_info" to have a corresponding
initializer. Let's do that, and make it use "REF_STATES_INIT" and
"STRING_LIST_INIT_DUP", doing that requires changing "list" and
"states" away from being pointers.

The resulting end-state is simpler since we omit the local "info_list"
and "states" variables in show() as well as the memset().

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/remote.c