Starting from commit 3ce05d2 'cmd/go: add support for Fossil SCM to go get', go get -u appears to attempt to update vendored git submodules but is apparently trying to do it in a way that doesn't work. This may have been not working properly for some time but previously masked by the issue from #13657, which probably prevented go get -u from trying this git update of such submodules.
Here is a reproduction and output from it:
$ export GOPATH=/tmp/scr; mkdir $GOPATH
$ go get github.com/davecheney/httpstat
$ go get -u github.com/davecheney/httpstat
# cd /tmp/scr/src/github.com/davecheney/httpstat/vendor/github.com/fatih/color; git pull --ff-only
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
package github.com/davecheney/httpstat/vendor/github.com/fatih/color: exit status 1
# cd /tmp/scr/src/github.com/davecheney/httpstat/vendor/golang.org/x/net; git pull --ff-only
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
package github.com/davecheney/httpstat/vendor/golang.org/x/net/http2: exit status 1
What version of Go are you using (
go version
)?This happens with the latest git tip
go version devel +b5dab2b
, and this specific form of the issue started happening fromdevel +3ce05d2
onward.What operating system and processor architecture are you using (
go env
)?What did you do?
Starting from commit 3ce05d2 'cmd/go: add support for Fossil SCM to go get',
go get -u
appears to attempt to update vendored git submodules but is apparently trying to do it in a way that doesn't work. This may have been not working properly for some time but previously masked by the issue from #13657, which probably preventedgo get -u
from trying this git update of such submodules.Here is a reproduction and output from it: