]> Cypherpunks repositories - gostls13.git/commit
cmd/go: propagate origin information for inexact module queries
authorBryan C. Mills <bcmills@google.com>
Wed, 15 Nov 2023 18:02:11 +0000 (13:02 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 16 Nov 2023 22:15:45 +0000 (22:15 +0000)
commitb9a08f159d3074ad5921a9d8625b267b64d957bc
treec151667793e44619804c704325cbd43a55efd26b
parent3e8000393e1b8e4cd0f8bb448bf4655920ff6fa4
cmd/go: propagate origin information for inexact module queries

Module queries for "@latest" and inexact constraints (like "@v1.3")
may consult information about tags and/or branches before finally
returning either a result or an error.

To correctly invalidate the origin information for the -reuse flag,
the reported Origin needs to reflect all of those inputs.

Fixes #61415.

Change-Id: I054acbef7d218a92a3bbb44517326385e458d907
Reviewed-on: https://go-review.googlesource.com/c/go/+/542717
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/modfetch/coderepo.go
src/cmd/go/internal/modload/build.go
src/cmd/go/internal/modload/query.go
src/cmd/go/testdata/script/mod_list_issue61415.txt [new file with mode: 0644]
src/cmd/go/testdata/script/reuse_git.txt
src/cmd/go/testdata/vcstest/git/issue61415.txt [new file with mode: 0644]