]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go/internal/modfetch: set protocol.version=2 for shallow git fetches
authorBryan C. Mills <bcmills@google.com>
Wed, 17 Jan 2024 20:00:40 +0000 (15:00 -0500)
committerBryan Mills <bcmills@google.com>
Thu, 18 Jan 2024 19:08:14 +0000 (19:08 +0000)
commit66d34c7d08d7c536c3165dc49ed318e73ea5acc2
treebce953d3841404a9ab9f02d6f8c2494382870d6e
parent5f949c4f2f5c45210612aee87713818a991f6a17
cmd/go/internal/modfetch: set protocol.version=2 for shallow git fetches

This works around an apparent bug in the Git HTTP backend, introduced
in Git 2.21, that causes responses for the version 1 protocol to
provide incomplete tags.

For Git commands older than 2.18, this configuration flag is ignored.
(Note that Git 2.29 and above already use protocol version 2 by
default.)

Fixes #56881.

Change-Id: I9b241cfb604e5f633ca6a5d799df6706246684a7
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/556358
Run-TryBot: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/modfetch/codehost/git.go