about summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit/nix-prefetch-git
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-11-09 06:01:40 +0000
committerGitHub <noreply@github.com>2023-11-09 06:01:40 +0000
commitfecd99b105c644b1b61abfec6c203b304269e1e2 (patch)
treeba0cde17b0de008691f339cdae1c4d19369a729c /pkgs/build-support/fetchgit/nix-prefetch-git
parent50249cdaf29f872fb960dc9110696d208a77fc3a (diff)
parent4aad65bfdbc56be726873b09b4bbaa88448ecbba (diff)
downloadnixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.tar
nixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.tar.gz
nixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.tar.bz2
nixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.tar.lz
nixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.tar.xz
nixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.tar.zst
nixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/build-support/fetchgit/nix-prefetch-git')
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index 8f8104863e67..e02b2ea7fbc2 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -207,6 +207,9 @@ checkout_ref(){
 
 # Update submodules
 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
 }