commit | 1523f3357b80cb4c3f150ac413e8d6a659fe6600 | [log] [tgz] |
---|---|---|
author | Marija Savtchouk <mariasavtchouk@google.com> | Fri Oct 01 15:23:39 2021 +0100 |
committer | Marija Savtchouk <mariasavtchouk@google.com> | Mon Oct 04 11:28:51 2021 +0000 |
tree | 133618fa6b777f3174baae4a6d849801779c6ed1 | |
parent | 88ab2404c2ae42ad8c30546b4565bb66b4cb1bf8 [diff] |
Do not check if user can read all refs with -b option Currently, with -b option, ListRefsfirst first checks if all refs are visible to the user [1]. This is done by checking permission for each ref pattern that has 'read' permission block block in project.config[2][3] Then 'read' permissions for each of the requested refs are checked[4] This is problematic if project.config has a large number of 'read' blocks. Since it is expected that the number of branches in the request is small, we can skip the check that all refs are visible and only check requested branches. [1]https://gerrit.googlesource.com/gerrit/+/refs/heads/master/java/com/google/gerrit/server/restapi/project/ListProjects.java#586 [2]https://gerrit.googlesource.com/gerrit/+/refs/heads/master/java/com/google/gerrit/server/permissions/ProjectControl.java#442 [3]https://gerrit.googlesource.com/gerrit/+/refs/heads/master/java/com/google/gerrit/server/permissions/ProjectControl.java#293 [4]https://gerrit.googlesource.com/gerrit/+/refs/heads/master/java/com/google/gerrit/server/restapi/project/ListProjects.java#723 Google-bug-Id: b/201425838 Change-Id: Ideb4cb41f106a2b1a58da777371d687dc1a5c65e
Gerrit is a code review and project management tool for Git based projects.
Gerrit makes reviews easier by showing changes in a side-by-side display, and allowing inline comments to be added by any reviewer.
Gerrit simplifies Git based project maintainership by permitting any authorized user to submit changes to the master Git repository, rather than requiring all approved changes to be merged in by hand by the project maintainer.
For information about how to install and use Gerrit, refer to the documentation.
Our canonical Git repository is located on googlesource.com. There is a mirror of the repository on Github.
Please report bugs on the issue tracker.
Gerrit is the work of hundreds of contributors. We appreciate your help!
Please read the contribution guidelines.
Note that we do not accept Pull Requests via the Github mirror.
The Developer Mailing list is repo-discuss on Google Groups.
Gerrit is provided under the Apache License 2.0.
Install Bazel and run the following:
git clone --recurse-submodules https://gerrit.googlesource.com/gerrit cd gerrit && bazel build release
The instruction how to configure GerritForge/BinTray repositories is here
On Debian/Ubuntu run:
apt-get update & apt-get install gerrit=<version>-<release>
NOTE: release is a counter that starts with 1 and indicates the number of packages that have been released with the same version of the software.
On CentOS/RedHat run:
yum clean all && yum install gerrit-<version>[-<release>]
On Fedora run:
dnf clean all && dnf install gerrit-<version>[-<release>]
Docker images of Gerrit are available on DockerHub
To run a CentOS 8 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-centos8
To run a Ubuntu 20.04 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-ubuntu20
NOTE: release is optional. Last released package of the version is installed if the release number is omitted.