]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.22] cmd/go/internal/modfetch: do not trust server to send all...
authorRuss Cox <rsc@golang.org>
Tue, 14 Jan 2025 04:00:14 +0000 (23:00 -0500)
committerMichael Knyszek <mknyszek@google.com>
Fri, 17 Jan 2025 16:30:44 +0000 (08:30 -0800)
commitc3c6a50095ab207e845776ddec7c28d2a1810ffe
treebc7ae1af1553a2f1b5fa5691ecf8827de2ce55b6
parente0a01acd041f24485667283170c10c3ee9a49d02
[release-branch.go1.22] cmd/go/internal/modfetch: do not trust server to send all tags in shallow fetch

Newer git versions (at least git 2.47.1) do not send all the matching tags
for a shallow fetch of a specific hash anymore. The go command assumes
that git servers do this. Since that assumption is broken, use the local
copy of the remote refs list to augment the tags sent by the server.
This makes the cmd/go/internal/modfetch tests pass again with newer git.

For #71261
Fixes #71262

Change-Id: I9fd4f3fd7beeb68a522938599f8f3acd887d0b26
Reviewed-on: https://go-review.googlesource.com/c/go/+/642437
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
(cherry picked from commit bd80d8956f3062d2b2bff2d7da6b879dfa909f12)
Reviewed-on: https://go-review.googlesource.com/c/go/+/642695
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/cmd/go/internal/modfetch/codehost/git.go