Navigation Menu

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

Untracked cmd/go/zosarch.go, cmd/go/zdefaultcc.go appear #19053

Closed
kevinburke opened this issue Feb 13, 2017 · 1 comment
Closed

Untracked cmd/go/zosarch.go, cmd/go/zdefaultcc.go appear #19053

kevinburke opened this issue Feb 13, 2017 · 1 comment

Comments

@kevinburke
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

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

master (commit 39fcf8b)

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/kevin"
GORACE=""
GOROOT="/Users/kevin/go"
GOTOOLDIR="/Users/kevin/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/sf/fsn3_vgd0n98r0jb86bgp83r0000gn/T/go-build409734631=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
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?

Compile Go using release-branch.go1.8 and then switch to master. The following untracked files appear:

  • cmd/go/zdefaultcc.go
  • cmd/go/zosarch.go

Or, compile Go on master and then switch to release-branch.go1.8. The following untracked files appear:

  • cmd/go/internal/cfg/zdefaultcc.go
  • cmd/go/internal/cfg/zosarch.go

What did you expect to see?

A clean working directory

What did you see instead?

Two untracked files. It would be nice if switching back and forth between branches didn't leave artifacts like this.

@josharian
Copy link
Contributor

josharian commented Feb 13, 2017

This is a consequence of .gitignore being part of the working tree. I don't think there's anything we can do about it, I'm afraid. I'm going to close this; if anyone comments with a suggested fix I'll happily re-open.

FWIW, what I do is keep many different copies of the repo around, one per release (1.4 tip, 1.7.5, 1.8rc3, tip). You can also do this using https://git-scm.com/docs/git-worktree. I think this is common practice.

@golang golang locked and limited conversation to collaborators Feb 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants