Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-init does not recurse submodules correctly #3320

Closed
ibotty opened this issue Oct 2, 2020 · 1 comment · Fixed by #3321
Closed

git-init does not recurse submodules correctly #3320

ibotty opened this issue Oct 2, 2020 · 1 comment · Fixed by #3321
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@ibotty
Copy link
Contributor

ibotty commented Oct 2, 2020

Reproduction

Cloning the level2branch of https://github.com/ibotty/git-clone-task-submodules-repro it fails to create level2/level1/README.md.

Reproduction

/path/to/git-init -path /tmp/repro/git-init -url https://github.com/ibotty/git-clone-task-submodules-repro.git -submodules=true -revision level2
[...]

does not create /tmp/repro/git-init/level2/level1/README.md, while

git clone https://github.com/ibotty/git-clone-task-submodules-repro.git git-clone

does

@ibotty ibotty added the kind/bug Categorizes issue or PR as related to a bug. label Oct 2, 2020
@ibotty
Copy link
Contributor Author

ibotty commented Oct 2, 2020

I guess, that in

updateArgs := []string{"submodule", "update", "--recursive"}
which does call git submodule update --recursive it should also add --init.

ibotty added a commit to ibotty/pipeline that referenced this issue Oct 2, 2020
ibotty added a commit to ibotty/pipeline that referenced this issue Oct 2, 2020
This updates `pkg/git`'s submodule updating to also `git submodule init` recursively.
Before submodules were not cloned recursively.

Fixes tektoncd#3320
tekton-robot pushed a commit that referenced this issue Oct 26, 2020
This updates `pkg/git`'s submodule updating to also `git submodule init` recursively.
Before submodules were not cloned recursively.

Fixes #3320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant