Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fixed JENKINS-46054] submodule repo URL with '.url' substring failed
Modify the submodule config parsing regular expression to correctly extract the submodule name from the config output. Splits cli submodule URL regexp use into two cases. git config --get-regex applies the regex to match keys, and returns all matches (including substring matches). Thus, a config call: git config -f .gitmodules --get-regexp "^submodule\.([^ ]+)\.url" will report two lines of output if the submodule URL includes ".url": submodule.modules/JENKINS-46504.url.path modules/JENKINS-46504.url submodule.modules/JENKINS-46504.url.url https://github.com/MarkEWaite/JENKINS-46054.url The code originally used the same pattern for get-regexp and for output parsing. By using the same pattern in both places, it incorrectly took the first line of output as the URL of a submodule (when it is instead the path of a submodule). Fixes tests added in previous commits.
- Loading branch information