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 -u produces confusing error for existing non-VCS directory #6175

Closed
dominikh opened this issue Aug 17, 2013 · 3 comments
Closed
Milestone

Comments

@dominikh
Copy link
Member

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. export GOPATH=/tmp/test_gopath
2. mkdir -p /tmp/test_gopath/src/github.com/foo/bar
3. go get -x -u github.com/foo/bar

What is the expected output?
An error that somehow includes $GOPATH/src/github.com/foo/bar

What do you see instead?
package github.com/foo/bar: directory "/tmp/test_gopath/src" is not using a
known version control system

Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?
Linux

Which version are you using?  (run 'go version')
go version devel +7fe02c8bf785 Thu Aug 15 13:15:55 2013 +1000 linux/amd64

Please provide any additional information below.
Seeing ""/tmp/test_gopath/src" is not using a known version control
system" is very confusing, because of course my /src/ isn't version controlled. It
distracts from the actual cause of the problem: No VCS in /src/github.com/foo/bar

Basically this is caused by vcsForDir (vcs.go) traversing upwards until it finds a VCS
or hits src/. Not sure how to cleanly solve this, since the traversal is for covering
cases like 'github.com/foo/bar/baz' where baz is just a directory in the foo/bar
repository.
@robpike
Copy link
Contributor

robpike commented Aug 17, 2013

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Sep 10, 2013

Comment 2:

This issue was closed by revision b99fdb2.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe label Apr 14, 2015
@gopherbot
Copy link

CL https://golang.org/cl/21342 mentions this issue.

gopherbot pushed a commit to golang/tools that referenced this issue Apr 8, 2016
Apply golang/go@b99fdb2.

Updates golang/go#6175.
Helps golang/go#11490.

Change-Id: I897bac1bac94b53e950cb5cf5e572d25a7c5996b
Reviewed-on: https://go-review.googlesource.com/21342
Reviewed-by: Andrew Gerrand <adg@golang.org>
@golang golang locked and limited conversation to collaborators Mar 31, 2017
This issue was closed.
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

4 participants