]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modfetch/codehost: replace a dubious call to semver.Max
authorBryan C. Mills <bcmills@google.com>
Fri, 20 Dec 2019 04:17:55 +0000 (23:17 -0500)
committerBryan C. Mills <bcmills@google.com>
Fri, 20 Dec 2019 15:34:39 +0000 (15:34 +0000)
commit3f51350c706c8ff663f12867bcfec98aa9fc46bf
tree9e9a1ec090979e60383ffc81b64e3293c131bc7a
parent82575285913b8b3d7257b21fd33b3226e78e5320
cmd/go/internal/modfetch/codehost: replace a dubious call to semver.Max

The documentation for RecentTag indicates that it returns an actual
tag, not a canonicalized prefix+version blob equivalent to a tag,
so the canonicalization due to semver.Max seems like a bug here.

Fortunately, RecentTag is not currently ever actually used as a tag,
so the removal of metadata does not result in a user-facing bug.
Nonetheless, it may be a subtle source of confusion for maintainers
in the future.

Updates #32700

Change-Id: I525423c1c0c7ec7c36c09e53b180034474f74e5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/212202
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/go/internal/modfetch/codehost/git.go
src/cmd/go/internal/modload/query_test.go