-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: go 1.7 get does not clone git submodules #16165
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
Labels
Milestone
Comments
I can confirm that with the following patch: diff --git a/src/cmd/go/vcs.go b/src/cmd/go/vcs.go
index f7c34de..df37c1a 100644
--- a/src/cmd/go/vcs.go
+++ b/src/cmd/go/vcs.go
@@ -383,9 +383,6 @@ func (v *vcsCmd) ping(scheme, repo string) error {
// The parent of dir must exist; dir must not.
func (v *vcsCmd) create(dir, repo string) error {
for _, cmd := range v.createCmd {
- if strings.Contains(cmd, "submodule") {
- continue
- }
if err := v.run(".", cmd, "dir", dir, "repo", repo); err != nil {
return err
}
@@ -396,9 +393,6 @@ func (v *vcsCmd) create(dir, repo string) error {
// download downloads any new changes for the repo in dir.
func (v *vcsCmd) download(dir string) error {
for _, cmd := range v.downloadCmd {
- if strings.Contains(cmd, "submodule") {
- continue
- }
if err := v.run(dir, cmd); err != nil {
return err
}
@@ -445,9 +439,6 @@ func (v *vcsCmd) tagSync(dir, tag string) error {
if tag == "" && v.tagSyncDefault != nil {
for _, cmd := range v.tagSyncDefault {
- if strings.Contains(cmd, "submodule") {
- continue
- }
if err := v.run(dir, cmd); err != nil {
return err
}
@@ -456,9 +447,6 @@ func (v *vcsCmd) tagSync(dir, tag string) error {
}
for _, cmd := range v.tagSyncCmd {
- if strings.Contains(cmd, "submodule") {
- continue
- }
if err := v.run(dir, cmd, "tag", tag); err != nil {
return err
}
This behavior matches what Go 1.6 does. |
This was referenced Jun 23, 2016
CL https://golang.org/cl/24531 mentions this issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I suspect the changes to
src/cmd/go/vcs.go
to remove thego15VendorExperiment
are not correct. Instead of skipping thegit submodule
commands when the vendor experiment is disabled, it now unconditionally skips them: 3e23442#diff-fb7e1ef0d86138e83d8f1debd67eaf06This is a regression from Go 1.6.
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
I expected the git submodules within my vendor/ directory to be present:
What did you see instead?
go get
did not clone the git submodules.The text was updated successfully, but these errors were encountered: