Re: [PATCH v6 4/4] environment: move has_symlinks into repo_config_values
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 16, 2026, 20:27 UTC
- Message-ID
- <xmqq33xifzni.fsf@gitster.g>
- In-Reply-To
- <20260716084941.1101918-5-cat@malon.dev>
Tian Yuchen <cat@malon.dev> writes:
Show 14 quoted lines
> Move the global 'has_symlinks' configuration into the > repository-specific 'repo_config_values' struct. > > To ensure code readability, the getter function > 'repo_has_symlinks()' has been introduced. Callers access > this configuration by passing in 'repo' when possible, > and explicitly fall back to 'the_repository' the rest > of the time. > > Note: > To support platform-specific overrides (MinGW) before > repository initialization, the 'platform_has_symlinks()' > macro is introduced in git-compat-util.h. Platforms can > override this in their respective headers.
This shouldn't be a mere "Note:" but should be treated as an integral part of the implementation details.
Move the global variable 'has_symlinks' into the
'repo_config_values struct. Introduce 'repo_has_symlinks()' getter for readability,
and 'platform_has_symlinks()' macro to allow platform
specific customization, primarily to help MinGW.may be sufficient.
The changes to compat/ looked reasonable to me.
Thanks.