Repository navigation
Conversation
'git submodule deinit' internally calls 'git config --get-regexp' to determine whether the configuration section for the submodule should be removed. Since the submodule name is included directly in the regular expression, names containing regexp metacharacters may cause the `submodule.<name>` section to remain in the configuration after 'git submodule deinit'. Change the arguments passed to the internal 'git config' call to retrieve matching configuration keys without including the submodule name in the regular expression. Signed-off-by: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>
Specifying "." as the submodule name for 'git submodule add' causes
the command to fail with a confusing error:
fatal: not a git repository: '.git/modules/.'
Additionally, when `extensions.submodulePathConfig` is set to true,
a `submodule...gitdir` entry is written to the configuration.
Reject "." as a submodule name early in 'git submodule add' to avoid
these problems.
Signed-off-by: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>
Author
|
/submit |
|
Submitted as pull.2340.git.1795989773.gitgitgadget@gmail.com To fetch this version into To fetch this version to local tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This series fixes issues with unusual submodule names.
The first patch fixes 'git submodule deinit' failing to remove the
configuration section for submodules whose names contain regexp
metacharacters.
The second patch rejects "." as a submodule name in 'git submodule
add'. This avoids a confusing error and prevents an invalid
submodule...gitdirentry from being written to the configurationwhen
extensions.submodulePathConfigis enabled.