From 88c449fe9bef3a147f5b8ca72b46d88dfedfe725 Mon Sep 17 00:00:00 2001 From: Christopher Harris Date: Thu, 19 Sep 2024 14:17:48 -0500 Subject: [PATCH] Delay submodule initiation until after branch checkout (#393) This fixes an issue where a submodule branch is not included in the history of the default branch upon first clone (where the clone recursively fetches the submodule) when the user passes the `--single-branch` argument to `clone-*`. --------- Co-authored-by: Paul Taylor <178183+trxcllnt@users.noreply.github.com> --- features/src/rapids-build-utils/devcontainer-feature.json | 2 +- .../opt/rapids-build-utils/bin/tmpl/repo.clone.tmpl.sh | 1 - features/src/utils/devcontainer-feature.json | 2 +- features/src/utils/opt/devcontainer/bin/git/repo/clone.sh | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/features/src/rapids-build-utils/devcontainer-feature.json b/features/src/rapids-build-utils/devcontainer-feature.json index fe3190f2..b6792894 100644 --- a/features/src/rapids-build-utils/devcontainer-feature.json +++ b/features/src/rapids-build-utils/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "NVIDIA RAPIDS devcontainer build utilities", "id": "rapids-build-utils", - "version": "24.10.9", + "version": "24.10.10", "description": "A feature to install the RAPIDS devcontainer build utilities", "containerEnv": { "BASH_ENV": "/etc/bash.bash_env" diff --git a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/tmpl/repo.clone.tmpl.sh b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/tmpl/repo.clone.tmpl.sh index 0ba647d4..d3dd0f45 100755 --- a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/tmpl/repo.clone.tmpl.sh +++ b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/tmpl/repo.clone.tmpl.sh @@ -51,7 +51,6 @@ clone_${NAME}() { --branch "${branch}" \ --ssh-url "${ssh_url}" \ --https-url "${https_url}" \ - --recurse-submodules \ -j ${n_jobs:-$(nproc --all --ignore=1)} \ -c checkout.defaultRemote=upstream \ "${OPTS[@]}" \ diff --git a/features/src/utils/devcontainer-feature.json b/features/src/utils/devcontainer-feature.json index 9bcbfffc..e46c6150 100644 --- a/features/src/utils/devcontainer-feature.json +++ b/features/src/utils/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "devcontainer-utils", "id": "utils", - "version": "24.10.4", + "version": "24.10.5", "description": "A feature to install RAPIDS devcontainer utility scripts", "containerEnv": { "BASH_ENV": "/etc/bash.bash_env" diff --git a/features/src/utils/opt/devcontainer/bin/git/repo/clone.sh b/features/src/utils/opt/devcontainer/bin/git/repo/clone.sh index ea045224..43ca2aee 100755 --- a/features/src/utils/opt/devcontainer/bin/git/repo/clone.sh +++ b/features/src/utils/opt/devcontainer/bin/git/repo/clone.sh @@ -108,7 +108,7 @@ clone_git_repo() { fi # shellcheck disable=SC2086 - git -C "${directory}" submodule update --recursive "${qj[@]}"; + git -C "${directory}" submodule update --init --recursive "${qj[@]}"; } clone_git_repo "$@" <&0;