]> Cypherpunks repositories - gostls13.git/commit
cmd/go: skip git sha256 tests if git < 2.29
authorDavid Finkel <david.finkel@gmail.com>
Sun, 24 Aug 2025 19:15:06 +0000 (15:15 -0400)
committerGopher Robot <gobot@golang.org>
Sun, 2 Nov 2025 15:51:05 +0000 (07:51 -0800)
commit388c41c412c24b751c8c09465787ae79bceca9c7
tree7a18bec6313d32d390581591459b2f0611139857
parent385dc33250336081c0c630938c3efede481eff76
cmd/go: skip git sha256 tests if git < 2.29

Fix test building on older Ubuntu LTS releases (that are still
supported). Git SHA256 support was only included in 2.29, which came out
in 2021. Check the output of `git version` and skip these tests if the
version is older than that introduction.

Thanks to @ianlancetaylor for flagging this.

Updates: #73704
Change-Id: I9d413a63fa43f34f94c274bba7f7b883c80433b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/698835
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
Auto-Submit: Michael Matloob <matloob@google.com>
Reviewed-by: Ian Alexander <jitsu@google.com>
src/cmd/go/internal/modfetch/codehost/git_test.go
src/cmd/go/internal/vcweb/script.go
src/cmd/go/scriptconds_test.go
src/cmd/go/testdata/script/README
src/cmd/go/testdata/script/build_git_sha256_go_get_branch.txt
src/cmd/go/testdata/script/build_git_sha256_moddep.txt
src/cmd/go/testdata/script/mod_download_git_bareRepository_sha256.txt
src/cmd/go/testdata/vcstest/git/gitrepo-sha256.txt
src/cmd/internal/script/engine.go