-
Notifications
You must be signed in to change notification settings - Fork 18k
x/review/git-codereview: test consistently failing with git version 2.29.2.454.gaff20da3a2-goog #42926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The tests pass on my machine with git 2.29.2, but if I run
then they start failing with the same error you see. So my guess is that you're seeing that failure because you switched the default branch name to |
I don't recall having made such a change myself, but it's possible that my site administrator changed the defaults somehow. Either way, the tests should be written such that they don't assume any particular details about the user's global Git configuraton or the default name of the default branch. |
@bcmills All but one test pass with the latest stable version of go and git at the time of writing this: $ git --version
git version 2.34.1
$ git config --global init.defaultBranch
main
$ go version
go version go1.17.5 openbsd/amd64
$ git remote -v
origin https://go.googlesource.com/review (fetch)
origin https://go.googlesource.com/review (push)
$ git log -1 --pretty='%H'
b8ead204a2e00eca3f1554da0b908d1d7b7afb9f
$ ls
AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE PATENTS README.md codereview.cfg git-codereview go.mod
$ go test ./...
--- FAIL: TestSyncRebase (0.67s)
sync_test.go:70: git-codereview sync
sync_test.go:88: git-codereview sync
sync_test.go:88: stderr:
hint: use --reapply-cherry-picks to include skipped commits
hint: Disable this message with "git config advice.skippedCherryPicks false"
sync_test.go:90: unexpected stderr:
hint: use --reapply-cherry-picks to include skipped commits
hint: Disable this message with "git config advice.skippedCherryPicks false"
FAIL
FAIL golang.org/x/review/git-codereview 45.360s
FAIL If I disable the diff --git a/git-codereview/util_test.go b/git-codereview/util_test.go
index 2d3bebe..89f91b3 100644
--- a/git-codereview/util_test.go
+++ b/git-codereview/util_test.go
@@ -187,6 +187,7 @@ func newGitTest(t *testing.T) (gt *gitTest) {
trun(t, client, "git", "clone", server, ".")
trun(t, client, "git", "config", "user.name", "gopher")
trun(t, client, "git", "config", "user.email", "[email protected]")
+ trun(t, client, "git", "config", "advice.skippedCherryPicks", "false")
// write stub hooks to keep installHook from installing its own.
// If it installs its own, git will look for git-codereview on the current path $ go test ./...
ok golang.org/x/review/git-codereview 48.993s Is it a good idea to disable |
@r5d, I think the |
I am no longer seeing the |
I suspect this was fixed by CL 279873. |
It's not clear to me when or why this started failing, but
go test ./...
from within thex/review
repo consistently fails for me locally:CC @golang/release
The text was updated successfully, but these errors were encountered: