From: Ævar Arnfjörð Bjarmason Date: Fri, 25 Jun 2021 00:03:24 GMT Subject: Re: [PATCH v2 22/24] midx: respect 'GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP' Message-ID: <87zgveyfk2.fsf@evledraar.gmail.com> In-Reply-To: <00418d5b096c049ddfc738b5d51ef65eae019607.1624314293.git.me@ttaylorr.com> On Mon, Jun 21 2021, Taylor Blau wrote: > Introduce a new 'GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP' environment > variable to also write a multi-pack bitmap when > 'GIT_TEST_MULTI_PACK_INDEX' is set. > > Signed-off-by: Taylor Blau > --- > builtin/repack.c | 13 ++++++++++--- > ci/run-build-and-tests.sh | 1 + > midx.h | 2 ++ > t/README | 4 ++++ > 4 files changed, 17 insertions(+), 3 deletions(-) > > diff --git a/builtin/repack.c b/builtin/repack.c > index 5f9bc74adc..77f6f03057 100644 > --- a/builtin/repack.c > +++ b/builtin/repack.c > @@ -515,7 +515,10 @@ int cmd_repack(int argc, const char **argv, const char *prefix) > if (!(pack_everything & ALL_INTO_ONE) || > !is_bare_repository()) > write_bitmaps = 0; > - } > + } else if (write_bitmaps && > + git_env_bool(GIT_TEST_MULTI_PACK_INDEX, 0) && > + git_env_bool(GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP, 0)) > + write_bitmaps = 0; Style nit: more if/else/elseif some with braces, some not...