You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version devel +c3d10e64b9 Wed May 16 21:15:03 2018 +0000 linux/amd64
Does this issue reproduce with the latest release?
yes.
What did you do?
I have a Go package whose source is a Git repository. The correct upstream for this repository uses a non-standard network protocol (let's call it xyz://), and that is what git config remote.origin.url reports. Git itself works fine with this.
I would like to run go get -u ./... in this repository in order to refresh it and all its dependencies, just like any other Go package.
What did you expect to see?
The repo and its dependencies should be updated, even though cmd/go doesn't understand the xyz:// protocoll
What did you see instead?
package <foo>: unable to parse output of git config remote.origin.url
The simple solution is for cmd/go to not refuse to even attempt to update an existing package if it can't understand its repo configuration. I have a sample fix that does this: https://go-review.googlesource.com/c/go/+/113456
I don't expect go get to be able to fetch a package with a non-standard Git remote URL (and a fresh fetch doesn't come up too often), though that's an obvious extension.
…source configuration
If a package is checked out in the right place, but uses, for instance,
an unusual Git remote configuration, don't refuse to update just because
cmd/go can't parse it. In most cases, `git pull -ff-only` (or the
equivalent in other VCSes) works just fine.
Updates #25432.
Change-Id: I1952a0e6e03f185f34029b186e1756c9549689e1
Reviewed-on: https://go-review.googlesource.com/113456
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
dsymonds
removed
the
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
label
Jun 7, 2018
An argument could still be made to permit unknown protocols to still be fetchable, but it's nowhere near as pressing as what 17f5423 fixed (updating in place), so I'm going to mark this as done.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version devel +c3d10e64b9 Wed May 16 21:15:03 2018 +0000 linux/amd64
Does this issue reproduce with the latest release?
yes.
What did you do?
I have a Go package whose source is a Git repository. The correct upstream for this repository uses a non-standard network protocol (let's call it
xyz://
), and that is whatgit config remote.origin.url
reports. Git itself works fine with this.I would like to run
go get -u ./...
in this repository in order to refresh it and all its dependencies, just like any other Go package.What did you expect to see?
The repo and its dependencies should be updated, even though
cmd/go
doesn't understand thexyz://
protocollWhat did you see instead?
package <foo>: unable to parse output of git config remote.origin.url
The simple solution is for
cmd/go
to not refuse to even attempt to update an existing package if it can't understand its repo configuration. I have a sample fix that does this: https://go-review.googlesource.com/c/go/+/113456I don't expect
go get
to be able to fetch a package with a non-standard Git remote URL (and a fresh fetch doesn't come up too often), though that's an obvious extension./cc @robpike
The text was updated successfully, but these errors were encountered: