Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Blocker
-
Resolution: Fixed
-
Component/s: git-client-plugin
-
Labels:
-
Environment:Jenkins 2.89.2
-
Similar Issues:
Description
If a submodule has a space in its name then Jenkins will fail to update that submodule. It looks like the reason is that the regex search has changed from:
git config -f .gitmodules --get-regexp ^submodule\.(.*)\.url
to:
git config -f .gitmodules --get-regexp ^submodule\.([^ ].*)\.url
This now ignores a submodule with a name something like:
Stingray/Stingray Studio 12.2
Attachments
Issue Links
- is duplicated by
-
JENKINS-48997 The new submodule pattern matching breaks submodules with spaces in name
-
- Closed
-
- is related to
-
JENKINS-46054 Unable to pull submodules that contain ".url" in the url
-
- Closed
-
Sorry about that!
In the short term, you'll need to switch from git client 2.7.0 back to git client 2.6.0. That will also force you to switch from git plugin 3.7.0 back to git plugin 3.6.4.
At first glance, I don't see a solution which will resolve both
JENKINS-46054and this bug. The parsing of the .gitmodules file will likely need to switch from using a regular expression to some other technique.I'd love to have an additional test proposed which shows this problem in the unit tests of the plugin. Even better would be a test followed by a proposed fix. You can refer to the unit tests I created, the integration test I created, and the change which satisfied those tests.
Ultimately, JENKINS-43977, JENKINS-41553, and JENKINS-38860 will force a different method of submodule management in the plugin.
I was surprised that an embedded space is allowed in a submodule name. Sorry that I missed that case when writing the original change!