commit | 39bdd41d03725878f1fd6f8b500ba6700f03bdad | [log] [tgz] |
---|---|---|
author | Kevin Burke <kevin@burke.dev> | Tue Mar 02 11:54:36 2021 -0800 |
committer | Kevin Burke <kev@inburke.com> | Fri Mar 05 20:15:19 2021 +0000 |
tree | 7c3203dc7263dbded5a4834109d7de23137cecf9 | |
parent | 44721f4565858526545c69b4846daeea40843a98 [diff] |
cmd/go/internal/modfetch/codehost: report git errors more accurately Previously, if you attempted to fetch a private repository, or your Git/curl client failed for an unknown reason, codehost would return an UnknownRevisionError, which reported that a given revision in go.mod was "unknown". This is confusing to many users who can go look in their browser for example and see that the commit-ish exists. Instead check whether "git ls-remote" exited with an error, and if so, return that instead of the UnknownRevision message. Fixes #42751. Change-Id: I0dbded878b2818280e61126a4493767d719ad577 Reviewed-on: https://go-review.googlesource.com/c/go/+/297950 Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Bryan C. Mills <bcmills@google.com> Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://golang.org/doc/contribute.html.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.