Skip to content

Commit 1d4d782

Browse files
author
Bryan C. Mills
committed
cmd/go/internal/modload: fix an erroneous comment about the test repo
Updates #36489 Change-Id: I1ca215ba0a64a31d662134385b8be46bb4ba4434 Reviewed-on: https://go-review.googlesource.com/c/go/+/214282 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
1 parent 5d00751 commit 1d4d782

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/cmd/go/internal/modload/query_test.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,14 @@ var queryTests = []struct {
163163
{path: queryRepoV2, query: "v2.6.0-pre1", vers: "v2.6.0-pre1"},
164164
{path: queryRepoV2, query: "latest", vers: "v2.5.5"},
165165

166-
// e0cf3de987e6 is the latest commit on the master branch, and it's actually
167-
// v1.19.10-pre1, not anything resembling v3: attempting to query it as such
168-
// should fail.
166+
// Commit e0cf3de987e6 is actually v1.19.10-pre1, not anything resembling v3,
167+
// and it has a go.mod file with a non-v3 module path. Attempting to query it
168+
// as the v3 module should fail.
169169
{path: queryRepoV3, query: "e0cf3de987e6", err: `vcs-test.golang.org/git/querytest.git/[email protected]: invalid version: go.mod has non-.../v3 module path "vcs-test.golang.org/git/querytest.git" (and .../v3/go.mod does not exist) at revision e0cf3de987e6`},
170+
171+
// The querytest repo does not have any commits tagged with major version 3,
172+
// and the latest commit in the repo has a go.mod file specifying a non-v3 path.
173+
// That should prevent us from resolving any version for the /v3 path.
170174
{path: queryRepoV3, query: "latest", err: `no matching versions for query "latest"`},
171175

172176
{path: emptyRepo, query: "latest", vers: "v0.0.0-20180704023549-7bb914627242"},

0 commit comments

Comments
 (0)