Edwin Kempin | 41f4ae7 | 2011-01-27 08:03:25 +0100 | [diff] [blame] | 1 | One or more refs/for/ names blocks change upload |
| 2 | ================================================ |
| 3 | |
| 4 | With this error message Gerrit rejects to push a commit for code |
| 5 | review if the remote git repository has a branch under the |
| 6 | 'refs/for/' namespace. |
| 7 | |
| 8 | Gerrit uses the 'refs/for/' namespace for magical refs that represent |
| 9 | the review queues for branches in the git repository hosted by |
| 10 | Gerrit. If, for a project, a real branch is created under the |
| 11 | 'refs/for' namespace this conflicts with the namespace reserved for |
| 12 | the Gerrit review queues and Gerrit can't accept further pushes for |
| 13 | code review. |
| 14 | |
| 15 | To solve this problem all real branches that exist under the |
| 16 | 'refs/for/' namespace have to be deleted or renamed in the remote git |
| 17 | repository. |
| 18 | |
| 19 | To see which branches exist under the 'refs/for/' namespace a Gerrit |
| 20 | administrator can run the following command: |
| 21 | |
| 22 | ---- |
| 23 | $ git for-each-ref refs/for |
| 24 | ---- |
| 25 | |
| 26 | If all these branches should be deleted it can be done with the |
| 27 | following command: |
| 28 | |
| 29 | ---- |
| 30 | $ for n in $(git for-each-ref --format='%(refname)' refs/for); |
| 31 | do git update-ref -d $n; done |
| 32 | ---- |
| 33 | |
| 34 | Branches under the 'refs/for/' namespace can be created by users that |
| 35 | bypass Gerrit and push directly to the git repository itself (not |
| 36 | using the Gerrit server's SSH port). |
| 37 | |
| 38 | |
| 39 | GERRIT |
| 40 | ------ |
| 41 | Part of link:error-messages.html[Gerrit Error Messages] |