From 4173df5187c8ba8bc2cc1a215f25b284d70631da Mon Sep 17 00:00:00 2001 From: Adrian Ratiu Date: Mon, 12 Jan 2026 20:46:25 +0200 Subject: submodule: introduce extensions.submodulePathConfig 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..gitdir repo config becomes the single source of truth for all submodule gitdir paths. The submodule..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. E.g. to add a missing config entry for an existing "foo" module: git config submodule.foo.gitdir .git/modules/foo Suggested-by: Junio C Hamano Suggested-by: Phillip Wood Suggested-by: Patrick Steinhardt Signed-off-by: Adrian Ratiu Signed-off-by: Junio C Hamano --- setup.h | 1 + 1 file changed, 1 insertion(+) (limited to 'setup.h') diff --git a/setup.h b/setup.h index 8522fa8575..568bb9f1d1 100644 --- a/setup.h +++ b/setup.h @@ -130,6 +130,7 @@ struct repository_format { char *partial_clone; /* value of extensions.partialclone */ int worktree_config; int relative_worktrees; + int submodule_path_cfg; int is_bare; int hash_algo; int compat_hash_algo; -- cgit v1.3