Skip to content

Commit

Permalink
Delay submodule initiation until after branch checkout (#393)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cwharris and trxcllnt committed Sep 19, 2024
1 parent fc6947a commit 88c449f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion features/src/rapids-build-utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}" \
Expand Down
2 changes: 1 addition & 1 deletion features/src/utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion features/src/utils/opt/devcontainer/bin/git/repo/clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 88c449f

Please sign in to comment.