Skip to content

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

@bradfitz

Description

@bradfitz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions