Added explanation for "not valid ref" error

Added a documentation page that explains the "not
valid ref" error in details and what can be done
to solve the problem.

Signed-off-by: Edwin Kempin <edwin.kempin@gmail.com>
Change-Id: I6881c45cc3ef54ed7970bbb1fc63e2ec546e3d86
This commit is contained in:
Edwin Kempin 2011-01-11 09:36:18 +01:00 committed by Shawn O. Pearce
parent 2512a1f882
commit b4830d201b
2 changed files with 47 additions and 0 deletions

View File

@ -15,6 +15,7 @@ Error Messages
* link:error-missing-changeid.html[missing Change-Id in commit message]
* link:error-multiple-changeid-lines.html[multiple Change-Id lines in commit message]
* link:error-no-new-changes.html[no new changes]
* link:error-not-valid-ref.html[not valid ref]
* link:error-permission-denied.html[Permission denied (publickey)]
* link:error-squash-commits-first.html[squash commits first]
* link:error-you-are-not-author.html[you are not author ...]

View File

@ -0,0 +1,46 @@
not valid ref
=============
With this error message Gerrit rejects to push a commit if the target
ref in the push specification has an incorrect format (for example:
'/refs/for/master', 'refs/for//master').
To solve the problem you have to correct the target ref in the push
specification. Depending on whether you want to push your commit with
or without code review the ref format is different:
ref format for pushing a commit for code review:
------------------------------------------------
If it was the intention to push a commit for code review the target
ref in the push specification must be the project's magical ref
`refs/for/'branch'` (where 'branch' must be replaced with the name
of an existing branch to which you want to push your commit). Further
details about how to push a commit for code review are explained at
link:user-upload.html#push_create[Create Changes]).
Example for pushing a commit for code review to the 'master' branch:
----
$ git push ssh://JohnDoe@host:29418/myProject HEAD:refs/for/master
----
ref format for directly pushing a commit (without code review):
---------------------------------------------------------------
If it was the intention to bypass code review and to push directly to
a branch the target ref in the push specification must be the name of
the branch to which you want to push. Further details about how to
bypass code review are explained at link:user-upload.html#bypass_review[Bypass Review].
Example for pushing a commit directly to the 'master' branch (without
code review):
----
$ git push ssh://JohnDoe@host:29418/myProject HEAD:master
----
GERRIT
------
Part of link:error-messages.html[Gerrit Error Messages]