Re: [PATCH v6 04/10] submodule: introduce extensions.submodulePathConfig
- From
Adrian Ratiu <adrian.ratiu@collabora.com>
- Date
- Dec 17, 2025, 07:30 UTC
- Message-ID
- <87ecotefb8.fsf@gentoo.mail-host-address-is-not-set>
- In-Reply-To
- <y7hfbq37mh2a6rnwvycul2e3fhxl7bljkdlukdpl3obgg57u3p@vgdsj2wo5nab>
On Tue, 16 Dec 2025, Josh Steadmon <steadmon@google.com> wrote:
Show 19 quoted lines
> On 2025.12.13 10:08, Adrian Ratiu wrote: >> The idea of this extension is to abstract away the submodule gitdir >> path implementation: everyone is expected to use the config and not >> worry about how the path is computed internally, either in git or >> other implementations. >> >> With this extension enabled, the submodule.<name>.gitdir repo config >> becomes the single source of truth for all submodule gitdir paths. >> >> The submodule.<name>.gitdir config is added automatically for all new >> submodules when this extension is enabled. >> >> Git will throw an error if the extension is enabled and a config is >> missing, advising users how to migrate. Migration is manual for now. > > This part doesn't seem accurate in my testing. When cloning a project > with `--recurse-submodules` and with the extension enabled globally, the > resulting .git/config does not include gitdir configs for any of the > cloned submodules, yet no error occurs.
Patrick already pointed out in the other patch that I misunderstood how the global config is supposed to work.
What you point out here is a side-effect of that. :)
I will fix the global config in v7. indeed it should throw an error.
I will also add four test combinations for cloning w/o --recurse-submodules and global config on/off.
I also missed these cases in the tests I added.
Many thanks, Adrian