Fixed issue #3935: speedup git submodule update
TortoiseGit's dialog "Submodule Update" executes only one command of git submodule update
instead of one per selected submodule.
If all submodules are selected, nothing needs to be specified to this command. If a subset of submodules is selected, a space-sepearated list of submodules is specified after the trailing --
for this command. In both cases, git still outputs status information on which submodules have been checked out to a new hash or for which an error occurred.
The fix introduces a bool to remember whether all submodules have been selected in the dialog. If this is the case, the command "git submodule update" is taken as is (with the options specified of course). Otherwise, a space-separated list of the selected submodules is provided as argument to the command.
With this fix, the update of the submodules is much faster. The example reported in #3935 (closed) takes only six seconds compared to 14 seconds, see .
Selecting a subset of submodules is also quite fast now. The screenshot shows the constructed command with the space-separated list of submodules' paths: .
In case of an error, the output window still clearly shows which submodule failed despite being done by one git command. So it is still feasible to identify the submodules where errors occurred, see