Adrian Ratiu 4cf8c114e3 submodule: allow runtime enabling extensions.submodulePathConfig
Add a new config `init.defaultSubmodulePathConfig` which allows
enabling `extensions.submodulePathConfig` for new submodules by
default (those created via git init or clone).

Important: setting init.defaultSubmodulePathConfig = true does
not globally enable `extensions.submodulePathConfig`. Existing
repositories will still have the extension disabled and will
require migration (for example via git submodule--helper command
added in the next commit).

Suggested-by: Patrick Steinhardt <ps@pks.im>
Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-08 11:05:15 +09:00

27 lines
1.1 KiB
Plaintext

:see-git-init:
ifndef::git-init[]
:see-git-init: (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].)
endif::[]
`init.templateDir`::
Specify the directory from which templates will be copied. {see-git-init}
`init.defaultBranch`::
Allows overriding the default branch name e.g. when initializing
a new repository.
`init.defaultObjectFormat`::
Allows overriding the default object format for new repositories. See
`--object-format=` in linkgit:git-init[1]. Both the command line option
and the `GIT_DEFAULT_HASH` environment variable take precedence over
this config.
`init.defaultRefFormat`::
Allows overriding the default ref storage format for new repositories.
See `--ref-format=` in linkgit:git-init[1]. Both the command line
option and the `GIT_DEFAULT_REF_FORMAT` environment variable take
precedence over this config.
init.defaultSubmodulePathConfig::
A boolean that specifies if `git init` and `git clone` should
automatically set `extensions.submodulePathConfig` to `true`. This
allows all new repositories to automatically use the submodule path
extension. Defaults to `false` when unset.