]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ar/submodule-gitdir-tweak' into seen
authorJunio C Hamano <gitster@pobox.com>
Thu, 6 Nov 2025 23:17:30 +0000 (15:17 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 6 Nov 2025 23:17:30 +0000 (15:17 -0800)
Avoid local submodule repository directory paths overlapping with
each other by encoding submodule names before using them as path
components.

* ar/submodule-gitdir-tweak:
  submodule: error out if gitdir name is too long
  submodule: encode gitdir paths to avoid conflicts
  strbuf: bring back is_rfc3986_unreserved
  submodule: add gitdir path config override
  submodule--helper: use submodule_name_to_gitdir in add_submodule

1  2 
Documentation/config/extensions.adoc
Makefile
builtin/submodule--helper.c
meson.build
repository.h
setup.c
submodule.c
t/meson.build
t/t9902-completion.sh

index 532456644b770e7f9a8d15b5eaac9eef143a5315,0f01b2871272c0cdbdc13eb624f67a9eb723da51..2235d565f5332b3ab044560edeab609bb580cfb2
@@@ -73,7 -69,16 +73,16 @@@ relativeWorktrees::
        repaired with either the `--relative-paths` option or with the
        `worktree.useRelativePaths` config set to `true`.
  
 -submoduleEncoding::
++submoduleEncoding:::
+       If enabled, submodule gitdir paths are encoded to avoid filesystem
+       conflicts due to nested gitdirs or case insensitivity. For now, only
+       url-encoding (rfc3986) is available, with a small addition to encode
+       uppercase to lowercase letters (`A  -> _a`, `B -> _b` and so on).
+       Other encoding or hashing methods may be added in the future.
+       Any preexisting non-encoded submodule gitdirs are used as-is, to
+       ease migration and reduce risk of gitdirs not being recognized.
 -worktreeConfig::
 +worktreeConfig:::
        If enabled, then worktrees will load config settings from the
        `$GIT_DIR/config.worktree` file in addition to the
        `$GIT_COMMON_DIR/config` file. Note that `$GIT_COMMON_DIR` and
diff --cc Makefile
Simple merge
Simple merge
diff --cc meson.build
Simple merge
diff --cc repository.h
Simple merge
diff --cc setup.c
Simple merge
diff --cc submodule.c
Simple merge
diff --cc t/meson.build
Simple merge
Simple merge