Skip to content

Commit cde7334

Browse files
committed
helpers / gitPullOrClone - support shallow cloning of submodules
When doing a shallow clone, also add --shallow-submodules which will do a shallow clone of submodules with depth 1. This significantly speeds up checkouts of repositories with a lot of submodules (eg lr-tic80).
1 parent 1f56852 commit cde7334

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scriptmodules/helpers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ function gitPullOrClone() {
435435
else
436436
local git="git clone --recursive"
437437
if [[ "$depth" -gt 0 ]]; then
438-
git+=" --depth $depth"
438+
git+=" --depth $depth --shallow-submodules"
439439
fi
440440
git+=" --branch $branch"
441441
printMsgs "console" "$git \"$repo\" \"$dir\""

0 commit comments

Comments
 (0)