diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-06-21 12:02:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 12:02:27 +0000 |
commit | c562a088e4d94c004b7def1ada925ec790c13b96 (patch) | |
tree | f87b304be2e0e011ddb4868c72acb6ec336e5765 /pkgs/build-support | |
parent | c4819c80112046e722b7869ce410f65069b18f16 (diff) | |
parent | d59df21d865dc85f0be2a1e7622f41ee8f98abc7 (diff) |
Merge staging-next into staging
Diffstat (limited to 'pkgs/build-support')
-rwxr-xr-x | pkgs/build-support/fetchgit/nix-prefetch-git | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index ba2dfa2fb2c48..e46ccf538bd54 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -206,27 +206,7 @@ checkout_ref(){ # Update submodules init_submodules(){ - # Add urls into .git/config file - clean_git submodule init - - # list submodule directories and their hashes - git submodule status | - while read -r l; do - local hash - local dir - local name - local url - - # checkout each submodule - hash=$(echo "$l" | awk '{print $1}' | tr -d '-') - dir=$(echo "$l" | sed -n 's/^.[0-9a-f]\+ \(.*[^)]*\)\( (.*)\)\?$/\1/p') - name=$( - git config -f .gitmodules --get-regexp submodule\..*\.path | - sed -n "s,^\(.*\)\.path $dir\$,\\1,p") - url=$(git config --get "${name}.url") - - clone "$dir" "$url" "$hash" "" - done + clean_git submodule update --init --recursive -j $NIX_BUILD_CORES } clone(){ |