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: disable go get chatter about git config #10922

Closed
rsc opened this issue May 21, 2015 · 6 comments
Closed

cmd/go: disable go get chatter about git config #10922

rsc opened this issue May 21, 2015 · 6 comments
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented May 21, 2015

This looks like bad debugging prints:

g% go get -u rsc.io/benchstat
# cd /Users/rsc/g/src/rsc.io/benchstat; git config remote.origin.url
# cd /Users/rsc/g/src/rsc.io/benchstat; git config remote.origin.url
g%
@rsc rsc added this to the Go1.5 milestone May 21, 2015
@dsymonds
Copy link
Contributor

I can't reproduce this at tip. Near as I can tell, those lines come from src/cmd/go/vcs.go:309, but are only printed when the command fails. That'll happen if, for instance, you don't have a remote called "origin" in an existing repository.

@c9s
Copy link
Contributor

c9s commented May 29, 2015

Can't reproduce too. at commit 80864cf

@c9s
Copy link
Contributor

c9s commented May 29, 2015

I can now reproduce it, I dropped the origin remote from rsc.io/benchstat and re-run command again, it shows the same message.

go get -u rsc.io/benchstat
# cd /Users/c9s/src/rsc.io/benchstat; git config remote.origin.url
# cd /Users/c9s/src/rsc.io/benchstat; git pull --ff-only
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

@c9s
Copy link
Contributor

c9s commented May 29, 2015

The error message is improved in this CL: https://go-review.googlesource.com/10475

@gopherbot
Copy link

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

rsc pushed a commit that referenced this issue Jun 27, 2015
- Let runOutput return the error message
- When `git config ...` returns empty buffer, it means the config key is
  correct, but there is no corresponding value.
- Return the correct error when the url of remote origin is not found.
- Update error message

Fixes: #10922

Change-Id: I3f8880f6717a4f079b840d1249174378d36bca1b
Reviewed-on: https://go-review.googlesource.com/10475
Reviewed-by: Russ Cox <rsc@golang.org>
@rsc
Copy link
Contributor Author

rsc commented Jun 29, 2015

Fixes syntax was wrong.

@rsc rsc closed this as completed Jun 29, 2015
@golang golang locked and limited conversation to collaborators Jun 28, 2016
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