Subject: Re: [PATCH v6 05/10] submodule: allow runtime enabling extensions.submodulePathConfig

From: Patrick Steinhardt <[email-masked]>
Date: Tue, 16 Dec 2025 10:09:49 +0100

On Sat, Dec 13, 2025 at 10:08:11AM +0200, Adrian Ratiu wrote:
> This adds the ability to enable the new extension via a runtime
> config to avoid having to enable it in each repo configuration.

I think this doesn't quite match what Junio and I suggested.

As far as I understand, this new runtime option will default-enable the
repository extension in _all_ repositories. But this isn't really
something that we should be doing, as it means that Git may now respect
the gitconfig even though the extension isn't enabled. Other
implementations of Git that don't understand the global configuration
will thus start to misbehave in that case.

The second issue is that the option will cause all existing repositories
that have submodules to be broken, as we don't have the "gitdir" config
key yet.

My suggestion was thus to have a global configuration that causes both
git-init(1) and git-clone(1) to automatically set the repository
extension for _new_ repositories. This allows developers not worry about
this in the future anymore, but it means that they will have to migrate
existing repositories, at least if they care about the extension. Which
I think is a fair tradeoff.

Patrick