Re: [PATCH v4 5/8] environment: move "precomposed_unicode" into `struct repo_config_values`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 1, 2026, 23:54 UTC
- Message-ID
- <xmqq1pep24wn.fsf@gitster.g>
- In-Reply-To
- <20260601154211.82370-6-belkid98@gmail.com>
Olamide Caleb Bello <belkid98@gmail.com> writes:
Show 6 quoted lines
> The `core.precomposeunicode` configuration is currently stored in the > global variable `precomposed_unicode`, which makes it shared across > repository instances within a single process. > ... > Change the type of the field from `int` to `bool` since it is parsed > as a boolean value.
Is it really? The variable (or the structure member in the new code) needs to be initialized to -1, so in that sense it is tristate (unspecified -1, false 0, or true 1).
Show 9 quoted lines
> diff --git a/environment.h b/environment.h
> index 514576b67a..508cb1afbc 100644
> --- a/environment.h
> +++ b/environment.h
> @@ -95,6 +95,7 @@ struct repo_config_values {
> int check_stat;
> int zlib_compression_level;
> int pack_compression_level;
> + int precomposed_unicode;And the code does not make such a type change. Leaving it "int" is also the right thing to do for this topic, as its stated goal is to turn the process-wide global into a per-repository setting.