diff options
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/config/extensions.adoc | 23 | ||||
| -rw-r--r-- | Documentation/config/submodule.adoc | 7 |
2 files changed, 30 insertions, 0 deletions
diff --git a/Documentation/config/extensions.adoc b/Documentation/config/extensions.adoc index 532456644b..f4f57c9114 100644 --- a/Documentation/config/extensions.adoc +++ b/Documentation/config/extensions.adoc @@ -73,6 +73,29 @@ relativeWorktrees::: repaired with either the `--relative-paths` option or with the `worktree.useRelativePaths` config set to `true`. +submodulePathConfig::: + This extension is for the minority of users who: ++ +-- +* Encounter errors like `refusing to create ... in another submodule's git dir` + due to a number of reasons, like case-insensitive filesystem conflicts when + creating modules named `foo` and `Foo`. +* Require more flexible submodule layouts, for example due to nested names like + `foo`, `foo/bar` and `foo/baz` not supported by the default gitdir mechanism + which uses `.git/modules/<plain-name>` locations, causing further conflicts. +-- ++ +When `extensions.submodulePathConfig` is enabled, the `submodule.<name>.gitdir` +config becomes the single source of truth for all submodule gitdir paths and is +automatically set for all new submodules both during clone and init operations. ++ +Git will error out if a module does not have a corresponding +`submodule.<name>.gitdir` set. ++ +Existing (pre-extension) submodules need to be migrated by adding the missing +config entries. This is done manually for now, e.g. for each submodule: +`git config submodule.<name>.gitdir .git/modules/<name>`. + worktreeConfig::: If enabled, then worktrees will load config settings from the `$GIT_DIR/config.worktree` file in addition to the diff --git a/Documentation/config/submodule.adoc b/Documentation/config/submodule.adoc index 0672d99117..74f1659a91 100644 --- a/Documentation/config/submodule.adoc +++ b/Documentation/config/submodule.adoc @@ -52,6 +52,13 @@ submodule.<name>.active:: submodule.active config option. See linkgit:gitsubmodules[7] for details. +submodule.<name>.gitdir:: + This sets the gitdir path for submodule <name>. This configuration is + respected when `extensions.submodulePathConfig` is enabled, otherwise it + has no effect. When enabled, this config becomes the single source of + truth for submodule gitdir paths and Git will error if it is missing. + See linkgit:git-config[1] for details. + submodule.active:: A repeated field which contains a pathspec used to match against a submodule's path to determine if the submodule is of interest to git |
