Subject: Re: [PATCH v5 7/7] meson/Makefile: allow setting submodule encoding at build time

From: Patrick Steinhardt <[email-masked]>
Date: Sat, 6 Dec 2025 13:02:52 +0100

On Sat, Dec 06, 2025 at 07:52:13AM +0900, Junio C Hamano wrote:
> Adrian Ratiu <[email-masked]> writes:
> 
> > On Fri, 05 Dec 2025, Patrick Steinhardt <[email-masked]> wrote:
> >> On Wed, Nov 19, 2025 at 11:10:30PM +0200, Adrian Ratiu wrote:
> >>> Some users find it difficult to distribute repo config changes for
> >>> enabling extensions.submoduleEncoding, or to enable it by passing
> >>> the config via cmdline, so we add a build-time option which can
> >>> enable the extension for convenience.
> >>
> >> Wouldn't it be more sensible to make this a runtime configuration key
> >> that users can configure in their gitconfig?
> >
> > The request I got from a combination of feedback from Junio, Aaron and
> > Josh is to avoid any kind of required user intervention or manual
> > migration, to find ways to automate the transition as much as possible.
> 
> How would that lead to build-time behaviour change, though?
> 
> Users in managed environments like $CORP can rely on /etc/gitconfig
> or equivalents managed by their corp-eng, so I am having a hard time
> imagining why we need anything more than an configuration variable
> looked at runtime.

I guess you could kind of have both: make it a runtime configuration
key, but have its default depend on a build configuration. You could for
example auto-enable it in case `WITH_BREAKING_CHANGES` is enabled. But I
myself am not sure whether the latter would really be all that important
in the first place.

Patrick