From: Joel Sing Date: Fri, 12 Dec 2025 08:03:05 +0000 (+1100) Subject: cmd/go/testdata/vcstest/git: use git commands that work on older git versions X-Git-Tag: go1.26rc2~7^2~3 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f8ee0f84753b22254d217bf28ce8ecca7db7025c;p=gostls13.git cmd/go/testdata/vcstest/git: use git commands that work on older git versions On older versions of git (such as 2.25.1), `git branch -M master` fails after `git init` - use `git checkout -b master` instead, which works across multiple versions. Fixes tests on the rather outdated linux/mips* builders. Change-Id: Id86ec82b37a8d2c3131f449276b13989d097d106 Reviewed-on: https://go-review.googlesource.com/c/go/+/729600 LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov Reviewed-by: Cherry Mui Reviewed-by: Dmitri Shuralyov --- diff --git a/src/cmd/go/testdata/vcstest/git/legacytest.txt b/src/cmd/go/testdata/vcstest/git/legacytest.txt index 5846983cef..6465242d62 100644 --- a/src/cmd/go/testdata/vcstest/git/legacytest.txt +++ b/src/cmd/go/testdata/vcstest/git/legacytest.txt @@ -6,7 +6,7 @@ env GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME env GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL git init -git branch -M master +git checkout -b master at 2018-07-17T12:41:39-04:00 cp x_cf92c7b.go x.go