fetch-pack: use file-scope static struct for fsck_options
commitc96e184cae4294a4ebd18a1bdf8d6514445f32e4
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sun, 28 Mar 2021 13:15:50 +0000 (28 15:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 29 Mar 2021 02:03:10 +0000 (28 19:03 -0700)
tree2ed04b5faf988d09f8e37f7a072090ca9ca08384
parent462f5cae0f764569da4e6a7ab40ee1d3b85353ed
fetch-pack: use file-scope static struct for fsck_options

Change code added in 5476e1efde (fetch-pack: print and use dangling
.gitmodules, 2021-02-22) so that we use a file-scoped "static struct
fsck_options" instead of defining one in the "fsck_gitmodules_oids()"
function.

We use this pattern in all of
builtin/{fsck,index-pack,mktag,unpack-objects}.c. It's odd to see
fetch-pack be the odd one out. One might think that we're using other
fsck_options structs in fetch-pack, or doing on fsck twice there, but
we're not.

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