-
Story
-
Resolution: Unresolved
-
Minor
-
None
For some reason, the git-client plugin iterates through the list of submodules (presumably by parsing the .gitmodules file) and manually issues a git submodule update command for each. Instead of this, it should simply issue a single git submodule update command without specifying a particular submodule, and then let the CLI do its job.
As part of this change, the new threads property of SubmoduleUpdateCommand should just be passed as --jobs rather than manually spawning threads in Java/Groovy.
[JENKINS-60052] Simplify git submodule update command
Summary | Original: Simplify git submoudle update command | New: Simplify git submodule update command |
Assignee | Original: Mark Waite [ markewaite ] |
Description |
Original:
For some reason, the git-client plugin iterates through the list of submodules (presumably by parsing the .gitmodules file) and manually issues a {{git submodule update}} command for each. Instead of this, it should simply issue a single {{git submodule update}} command without specifying a particular submodule, and the let the CLI do its job. As part of this change, the new {{threads}} property of SubmoduleUpdateCommand should just be passed as {{--jobs}} rather than manually spawning threads in Java/Groovy. |
New:
For some reason, the git-client plugin iterates through the list of submodules (presumably by parsing the .gitmodules file) and manually issues a {{git submodule update}} command for each. Instead of this, it should simply issue a single {{git submodule update}} command without specifying a particular submodule, and then let the CLI do its job. As part of this change, the new {{threads}} property of SubmoduleUpdateCommand should just be passed as {{--jobs}} rather than manually spawning threads in Java/Groovy. |
That type of change was attempted as part of the threaded submodule update implementation. We were unable to retain compatibility with previous behaviors. Retaining compatibility is critical for users depending on the git plugin. If you have a pull request that retains compatibility and switches to use git submodule update, I'm confident there will be reviewers willing to assist with the review.