RefControl: Use consistent rev-walking logic in canCreate
The intent of I4e580e2f was to allow creation of new branches along
with pushing new commits only if the user has push permissions, but
the implementation was buggy. For this change, we define "new commits"
as anything not reachable from a visible branch or tag (which
excludes, for example, commits of visible but not merged patch sets).
We previously defined a more correct walk in ProjectControl for
determining if a commit is merged into a visible branch, so reuse that
logic from RefControl.
Change-Id: I2e6181de5bf2a990ee58fb8e9d72b3370eba5cb8
4 files changed