Re: [PATCH v2 22/24] midx: respect 'GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP'
On Mon, Jun 21 2021, Taylor Blau wrote:
Show 25 quoted lines
> 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 <me@ttaylorr.com>
> ---
> 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...