cmd/go/internal/modfetch/gitrepo: fix fetch of tags This is apparently another Gerrit/JGit bug: fetch -t is supposed to be shorthand for including refs/tags/*:refs/tags/* on the command-line, but not for go.googlesource.com. Avoid -t. Change-Id: I3e6264f7cbaf3e41fa248ca7f50846ef6f4a8a02 Reviewed-on: https://go-review.googlesource.com/121299 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
diff --git a/vendor/cmd/go/internal/modfetch/gitrepo/fetch.go b/vendor/cmd/go/internal/modfetch/gitrepo/fetch.go index a2f58c0..a4ee7fc 100644 --- a/vendor/cmd/go/internal/modfetch/gitrepo/fetch.go +++ b/vendor/cmd/go/internal/modfetch/gitrepo/fetch.go
@@ -348,7 +348,7 @@ if len(unshallowFlag) > 0 { protoFlag = []string{"-c", "protocol.version=0"} } - if _, err := codehost.Run(r.dir, "git", protoFlag, "fetch", unshallowFlag, "-f", "-t", r.remote, "refs/heads/*:refs/heads/*"); err != nil { + if _, err := codehost.Run(r.dir, "git", protoFlag, "fetch", unshallowFlag, "-f", r.remote, "refs/heads/*:refs/heads/*", "refs/tags/*:refs/tags/*"); err != nil { return nil, err } }