Skip to content
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

x/review/git-codereview: can't run git change #9408

Open
bradfitz opened this issue Dec 20, 2014 · 1 comment
Open

x/review/git-codereview: can't run git change #9408

bradfitz opened this issue Dec 20, 2014 · 1 comment
Milestone

Comments

@bradfitz
Copy link
Contributor

git-codereview is confused and thinks I'm on some other branch:

ba12:oauth2 bradfitz$ go get -u -v golang.org/x/review/git-codereview
Fetching https://golang.org/x/review/git-codereview?go-get=1
Parsing meta tags from https://golang.org/x/review/git-codereview?go-get=1 (status code 200)
get "golang.org/x/review/git-codereview": found meta tag main.metaImport{Prefix:"golang.org/x/review", VCS:"git", RepoRoot:"https://go.googlesource.com/review"} at https://golang.org/x/review/git-codereview?go-get=1
get "golang.org/x/review/git-codereview": verifying non-authoritative meta tag
Fetching https://golang.org/x/review?go-get=1
Parsing meta tags from https://golang.org/x/review?go-get=1 (status code 200)
golang.org/x/review (download)

ba12:oauth2 bradfitz$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 12 commits.
#   (use "git push" to publish your local commits)
#
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   modified:   transport.go
#

ba12:oauth2 bradfitz$ git branch
* master

ba12:oauth2 bradfitz$ git diff --cached
diff --git a/transport.go b/transport.go
index 9e7b106..10339a0 100644
--- a/transport.go
+++ b/transport.go
@@ -62,7 +62,7 @@ func (t *Transport) CancelRequest(req *http.Request) {
        type canceler interface {
                CancelRequest(*http.Request)
        }
-       if cr, ok := t.Base.(canceler); ok {
+       if cr, ok := t.base().(canceler); ok {
                t.mu.Lock()
                modReq := t.modReq[req]
                delete(t.modReq, req)

ba12:oauth2 bradfitz$ git codereview change nilbase
git-codereview: cannot branch from work branch; change back to master first.

ba12:oauth2 bradfitz$ git branch
* master

/cc @adg @rsc

@bradfitz
Copy link
Contributor Author

The clue is in Your branch is ahead of 'origin/master' by 12 commits, but the codereview tool gives a very misleading error message (change back to master first).

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title review: can't run git change x/review: can't run git change Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-review label Apr 14, 2015
@mikioh mikioh changed the title x/review: can't run git change x/review/git-codereview: can't run git change Aug 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants