fetchgit: pass --checkout when fetching submodules

For projects that have `submodule.$name.update` set to something other
than the default value of "checkout", this change will ensure those
submodules are fetched as well.
This commit is contained in:
Jared Baur
2025-07-16 22:13:22 -07:00
committed by Philip Taron
parent 6c6254bd01
commit 5cd869caa4
+2 -2
View File
@@ -214,8 +214,8 @@ checkout_ref(){
init_submodules(){
# shallow with leaveDotGit will change hashes
[[ -z "$deepClone" ]] && [[ -z "$leaveDotGit" ]] && \
clean_git submodule update --init --recursive -j ${NIX_BUILD_CORES:-1} --progress --depth 1 || \
clean_git submodule update --init --recursive -j ${NIX_BUILD_CORES:-1} --progress
clean_git submodule update --init --recursive --checkout -j ${NIX_BUILD_CORES:-1} --progress --depth 1 || \
clean_git submodule update --init --recursive --checkout -j ${NIX_BUILD_CORES:-1} --progress
}
clone(){