cmd/go: go1
branch breaks go get -u
when default branch is still master
#27526
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.10.3 linux/amd64
Does this issue reproduce with the latest release?
Probably. 1.10.3 is very recent.
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build171873923=/tmp/go-build -gno-record-gcc-switches"
What did you do?
Create a remote repository for a simple program in which the
go1
branch is one commit ahead of master, butHEAD
still points tomaster
.Install the program with
go get -u github.com/whatever
. This works.Now without changing the repository, try
go get -u github.com/whatever
again, and it will fail.What did you expect to see?
Within the gopath, go has cloned the repository and created a local branch tracking
origin/go1
.go get -u
pulls fromgo1
(with nothing to pull since no changes) and successfully rebuilds the program.What did you see instead?
And if I cd to
/home/user/go/src/github.com/whatever
, I'm in a detached head state:The text was updated successfully, but these errors were encountered: