diff options
| author | Russ Cox <rsc@golang.org> | 2021-01-07 12:26:06 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2021-01-07 17:26:24 +0000 |
| commit | 541f6aec3b30c1bd064ea95cdaaf57f4e65bef4d (patch) | |
| tree | 660810907f7bd23d80f421446509fb685d041b59 /git-codereview/hook_test.go | |
| parent | 9593f86427dedbe2eda472886bd2a4f8c965abf5 (diff) | |
| download | go-x-review-541f6aec3b30c1bd064ea95cdaaf57f4e65bef4d.tar.xz | |
git-codereview: update tests for "main" branch default
"git init ." leaves me on "main" now, not "master".
Update tests to expect that, and update the "tracking" message too
(otherwise the tests fail).
Because not all gits agree about the initial branch name,
set it explicitly too in the test.
Fixes #42926.
Change-Id: If3adb3bb53beba9efcd75cad0f081f59fba85fe7
Reviewed-on: https://go-review.googlesource.com/c/review/+/279873
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'git-codereview/hook_test.go')
| -rw-r--r-- | git-codereview/hook_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-codereview/hook_test.go b/git-codereview/hook_test.go index e9dc1c3..d4ffbc4 100644 --- a/git-codereview/hook_test.go +++ b/git-codereview/hook_test.go @@ -210,10 +210,10 @@ func testHookCommitMsgBranchPrefix(t *testing.T, gerrit bool) { } // Master has no prefix. - testMain(t, "change", "master") + testMain(t, "change", "main") checkPrefix("Test message.\n") - // Work branch from master has no prefix. + // Work branch from main has no prefix. testMain(t, "change", "work") checkPrefix("Test message.\n") } |
