]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.22] cmd/go/internal/modfetch: pass "-c" arguments to git before...
authorBryan C. Mills <bcmills@google.com>
Wed, 6 Mar 2024 22:50:45 +0000 (17:50 -0500)
committerThan McIntosh <thanm@google.com>
Wed, 27 Mar 2024 17:03:54 +0000 (17:03 +0000)
commit0c53f93faa04ba12bc6c2075cae4ae6608782d62
treeece080f9952e93555c0727a607f697f4df17c440
parentabfd57815645d9d2e2f55cffd88df6167f3d3dda
[release-branch.go1.22] cmd/go/internal/modfetch: pass "-c" arguments to git before subcommands

I accidentally transposed the arguments in CL 556358, causing the
shallow 'git fetch' attempt to always fail. That didn't break any
tests because we fall back to a full fetch, which works for nearly all
real Git servers, and we didn't have a test that checked for shallow
fetches.

Tested manually using:
GOPROXY=direct go mod download -x -json gerrit.wikimedia.org/r/mediawiki@v0.0.0-20240202145822-67da0cbcfdf7

(I'm still thinking about how to add a proper regression test.)

Fixes #66256.
Updates #66147.

Change-Id: I0bb17283bae856f369fd24f29375e507d0999933
Reviewed-on: https://go-review.googlesource.com/c/go/+/569422
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 2ab9218c86ed625362df5060f64fcd59398a76f3)
Reviewed-on: https://go-review.googlesource.com/c/go/+/570737
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
src/cmd/go/internal/modfetch/codehost/git.go
src/cmd/go/testdata/script/reuse_git.txt