Re: [PATCH v4 3/8] environment: move `zlib_compression_level` into `struct repo_config_values`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 2, 2026, 00:07 UTC
- Message-ID
- <xmqqpl29ztx7.fsf@gitster.g>
- In-Reply-To
- <20260601154211.82370-4-belkid98@gmail.com>
Olamide Caleb Bello <belkid98@gmail.com> writes:
Show 5 quoted lines
> @@ -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?
Show 11 quoted lines
> 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);