From 5cd869caa4ea1bf1bde71731ecc96b24e1bdcc2d Mon Sep 17 00:00:00 2001 From: Jared Baur Date: Sat, 3 Feb 2024 19:57:06 -0800 Subject: [PATCH] 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. --- pkgs/build-support/fetchgit/nix-prefetch-git | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 9d55c9019e08..f8dd93912644 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -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(){