Closed bcmills closed 8 months ago
Notably, following the commands in that -x
trace:
/tmp/mediawiki$ git fetch -f -c protocol.version=2 --depth=1 origin 67da0cbcfdf7f6e1c40e9d145df77a088fb6231e:refs/dummy
error: unknown switch `c'
Change https://go.dev/cl/569422 mentions this issue: cmd/go/internal/modfetch: pass "-c" arguments to git before subcommands
@gopherbot, please backport to Go 1.22. This was an accidental regression in https://go.dev/cl/556358, and may cause increased client and server load when fetching modules directly from git repositories.
Backport issue(s) opened: #66256 (for 1.22).
Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.
Change https://go.dev/cl/570737 mentions this issue: cmd/go/internal/modfetch: pass "-c" arguments to git before subcommands
Go version
go version devel go1.23-7986e26a39 Mon Mar 4 18:59:50 2024 +0000 linux/amd64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
What did you expect to see?
Successful fetch, as with previous
go
versions.It appears that I put the arguments in the wrong order in https://go.dev/cl/556358, inadventently breaking shallow
git
fetches. That went undiagnosed, because it fixed the symptom I was testing for (#56881) and we didn't have any tests specifically probing for shallowness of git repos in the module cache.(CC @suzmue @matloob @samthanawalla)