gc: refactor a "call me once" pattern
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 15 Mar 2019 15:59:54 +0000 (16:59 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Mar 2019 06:09:40 +0000 (15:09 +0900)
Change an idiom we're using to ensure that gc_before_repack() only
does work once (see 62aad1849f ("gc --auto: do not lock refs in the
background", 2014-05-25)) to be more obvious.

Nothing except this function cares about the "pack_refs" and
"prune_reflogs" variables, so let's not leave the reader wondering if
they're being zero'd out for later use somewhere else.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found