Subject: Re: [PATCH v4 3/8] environment: move `zlib_compression_level` into `struct repo_config_values`

From: Junio C Hamano <[email-masked]>
Date: Tue, 02 Jun 2026 09:07:32 +0900

Olamide Caleb Bello <[email-masked]> writes:

> @@ -906,6 +906,7 @@ static int start_loose_object_common(struct odb_source *source,
>  	const struct git_hash_algo *algo = source->odb->repo->hash_algo;
>  	const struct git_hash_algo *compat = source->odb->repo->compat_hash_algo;
>  	int fd;
> +	struct repo_config_values *cfg = repo_config_values(the_repository);

Would source->odb->repo have properly initialized repo_config_values
structure at this point?  Shouldn't we be using it for this call,
instead of the_repository?

>  	fd = create_tmpfile(source->odb->repo, tmp_file, filename);
>  	if (fd < 0) {
> @@ -921,7 +922,7 @@ static int start_loose_object_common(struct odb_source *source,
>  	}
>  
>  	/*  Setup zlib stream for compression */
> -	git_deflate_init(stream, zlib_compression_level);
> +	git_deflate_init(stream, cfg->zlib_compression_level);
>  	stream->next_out = buf;
>  	stream->avail_out = buflen;
>  	algo->init_fn(c);