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

cmd/go: go get fails when GIT_TRACE=1 #19682

Closed
ixdy opened this issue Mar 23, 2017 · 3 comments
Closed

cmd/go: go get fails when GIT_TRACE=1 #19682

ixdy opened this issue Mar 23, 2017 · 3 comments
Labels
FrozenDueToAge help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ixdy
Copy link
Contributor

ixdy commented Mar 23, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

$ go version
go version go1.8 linux/amd64

What operating system and processor architecture are you using (go env)?

$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="[$HOME]/.gvm/pkgsets/go1.8/global"
GORACE=""
GOROOT="[$HOME]/.gvm/gos/go1.8"
GOTOOLDIR="[$HOME]/.gvm/gos/go1.8/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build814346723=/tmp/go-buil
d -gno-record-gcc-switches"                                                                              CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

$ rm -rf /tmp/go
$ GOPATH=/tmp/go GIT_TRACE=1 go get -u golang.org/x/tools/cmd/godoc
package golang.org/x/tools/blog: parse 14:36:36.564014 git.c:371               trace: built-in: git 'conf
ig' 'remote.origin.url'                                                                                  https://go.googlesource.com/tools: first path segment in URL cannot contain colon
package golang.org/x/tools/godoc: parse 14:36:36.565587 git.c:371               trace: built-in: git 'con
fig' 'remote.origin.url'                                                                                 https://go.googlesource.com/tools: first path segment in URL cannot contain colon
package golang.org/x/tools/godoc/analysis: parse 14:36:36.567054 git.c:371               trace: built-in:
 git 'config' 'remote.origin.url'                                                                        https://go.googlesource.com/tools: first path segment in URL cannot contain colon
package golang.org/x/tools/godoc/redirect: parse 14:36:36.568513 git.c:371               trace: built-in:
 git 'config' 'remote.origin.url'                                                                        https://go.googlesource.com/tools: first path segment in URL cannot contain colon
package golang.org/x/tools/godoc/static: parse 14:36:36.569965 git.c:371               trace: built-in: g
it 'config' 'remote.origin.url'                                                                          https://go.googlesource.com/tools: first path segment in URL cannot contain colon
package golang.org/x/tools/godoc/vfs: parse 14:36:36.571433 git.c:371               trace: built-in: git 
'config' 'remote.origin.url'                                                                             https://go.googlesource.com/tools: first path segment in URL cannot contain colon
package golang.org/x/tools/godoc/vfs/gatefs: parse 14:36:36.574302 git.c:371               trace: built-i
n: git 'config' 'remote.origin.url'                                                                      https://go.googlesource.com/tools: first path segment in URL cannot contain colon
package golang.org/x/tools/godoc/vfs/mapfs: parse 14:36:36.576886 git.c:371               trace: built-in
: git 'config' 'remote.origin.url'                                                                       https://go.googlesource.com/tools: first path segment in URL cannot contain colon
package golang.org/x/tools/godoc/vfs/zipfs: parse 14:36:36.579459 git.c:371               trace: built-in
: git 'config' 'remote.origin.url'                                                                       https://go.googlesource.com/tools: first path segment in URL cannot contain colon
package golang.org/x/tools/playground: parse 14:36:36.581953 git.c:371               trace: built-in: git
 'config' 'remote.origin.url'                                                                            https://go.googlesource.com/tools: first path segment in URL cannot contain colon
$ ls /tmp/go/src/golang.org/x/tools/
AUTHORS    cmd             CONTRIBUTING.md  go       LICENSE     present   third_party
benchmark  codereview.cfg  CONTRIBUTORS     godoc    PATENTS     README
blog       container       cover            imports  playground  refactor
$ GOPATH=/tmp/go GIT_TRACE=0 go get -u golang.org/x/tools/cmd/godoc
$ GOPATH=/tmp/go GIT_TRACE=1 go get -u golang.org/x/tools/cmd/godoc
package golang.org/x/tools/cmd/godoc: parse 14:37:04.825728 git.c:371               trace: built-in: git 
'config' 'remote.origin.url'                                                                             https://go.googlesource.com/tools: first path segment in URL cannot contain colon

What did you expect to see?

I expected go get to work, even when GIT_TRACE=1.

What did you see instead?

go get gave weird git-related failures.

@ianlancetaylor ianlancetaylor changed the title go get fails when GIT_TRACE=1 cmd/go: go get fails when GIT_TRACE=1 Mar 23, 2017
@ianlancetaylor
Copy link
Contributor

Seems like if we think this should be fixed, the fix is to remove GIT_TRACE from the environment.

@andybons
Copy link
Member

Do we rely on any git output from stderr? If not then we could ignore it and setting any git debug env vars would have no effect.

/cc @bcmills

@andybons andybons added help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Apr 11, 2018
@andybons andybons added this to the Unplanned milestone Apr 11, 2018
@gopherbot
Copy link

Change https://golang.org/cl/126735 mentions this issue: cmd/go: fix go get fail when GIT_TRACE set

@golang golang locked and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants