Yoichi Nakayama posted a two-patch series via GitGitGadget on handling unusual submodule names.
The first patch addresses 'git submodule deinit'. It calls 'git config --get-regexp' with the submodule name embedded in the regular expression to decide whether to remove the submodule.<name> section. Names containing regexp metacharacters can therefore leave the section behind. The patch changes the arguments to the internal 'git config' call so that matching keys are retrieved without putting the name in the expression. It changes builtin/submodule--helper.c.
The second patch rejects "." as a name in 'git submodule add'. Currently that fails with the confusing error "fatal: not a git repository: '.git/modules/.'". When extensions.submodulePathConfig is true, it also writes a submodule...gitdir entry to the configuration. The patch rejects the name early. It touches submodule-config.c and adds tests to t7400-submodule-basic.sh.
No review replies appear in the excerpts.