When a branch's upstream is not set, the error message is cryptic. This just happened to me as a consequence of switching branches before mailing a CL. Here's a sample bash transcript to illustrate the issue and to provide a fix for any issue spelunkers who find this in the meantime.
$ # do work
$ git change branch1
$ # decide branch2 is a better name
$ git checkout -branch branch2
$ git branch -D branch1
$ git mail
git rev-parse --abbrev-ref branch2@{u}
fatal: ambiguous argument 'branch2@{u}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
branch2@{u}
git-codereview: exit status 128
$ # fix the problem
$ git branch --set-upstream master branch2
$ git mail
remote: Processing changes: new: 1, done
...
When a branch's upstream is not set, the error message is cryptic. This just happened to me as a consequence of switching branches before mailing a CL. Here's a sample bash transcript to illustrate the issue and to provide a fix for any issue spelunkers who find this in the meantime.