9fd0c50a8a

Direct push local commits to create a new branch is rejected, even when user group can - 'Read', - 'Create Reference', - 'Push' on 'refs/heads/*'. User have to firstly create new branch with a commit which exists on server side, then push other local new commits. The reason is that Gerrit take it for granted that the commits used to create new branch exist on server side already, so Gerrit only check the commits are reachable or not on the server side. According to the same reason if user group can 'Read' on 'refs/*' or have Global Capabilities 'Administrate Server', Gerrit will think the commits sure will be reachable for user and stop do further checking. So Gerrit does not work in the cases where creating new branch with local new commits, e.g. the commits come from outer partners and need not review, and the user group is not of Admin group and should not be able to see every thing for some business rules reason. Taking local new commits into account, also including the related permission checking, now it can be finished in one step to create new branch and push local new commits. Bug: Issue 2441 Change-Id: I4e580e2fe0b40b8d0fbb06c5c8d1efd61127a842
Description
RETIRED, Gerrit as used by OpenStack