commit | 1063e30c58575c1a47dfa18418cb8e8cb4bf02cf | [log] [tgz] |
---|---|---|
author | Jonathan Nieder <jrn@google.com> | Tue Apr 02 22:29:31 2019 -0700 |
committer | Jonathan Nieder <jrn@google.com> | Tue Apr 02 22:51:38 2019 -0700 |
tree | 6062716d65b3ec280ab3a863b817797b5314ed6c | |
parent | 1a4b6382da011031fa0a76ea3217f0244307daae [diff] |
Reject changes with Change-Id above footer Documentation/user-change-id.txt explains: To be picked up by Gerrit, a Change-Id line must be in the footer (last paragraph) of a commit message, and may be mixed together with Signed-off-by, Acked-by, or other such lines. It is easy to forget to do that, producing a commit message like Do something great Change-Id: I55ca6286e3e4f4fba5d0448333fa99fc5a404a73 Bug: 12345 Because of the blank line between the Change-Id and other trailer line, the Change-Id is not picked up by Gerrit. Worse, if the repository is configured with "Require Change-Id in commit message" set to false, then Gerrit comes up with its own change-id for the change. If I amend my commit in response to review comments and push for review again, Gerrit comes up with another change-id, so my amended version of the change shows up as a new change. This sequence of events can be avoided by setting "Require Change-Id" to true, but some projects like to review changes from upstreams that don't use Gerrit. Fortunately, even these projects don't need changes with a Change-Id before the footer. Treat them as an error unconditionally, with the same advice to the user about how to clean up that is already shown in Require Change-Id mode: ERROR: Change-Id must be in message footer Hint: run git commit --amend and move 'Change-Id: Ixxx..' to the bottom on a separate line As a side benefit, treating this as its own error type also allows simplifying the error reporting for changes with no Change-Id. Reported-by: Paul Crowley <paulcrowley@google.com> Change-Id: Ia5d43370e075d6fc13cd9b22031436f1138e90c0
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 IRC channel on freenode is #gerrit. An archive is available at: echelog.com.
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 7 based Gerrit image:
docker run -p 8080:8080 gerritforge/gerrit-centos7[:version]
To run a Ubuntu 15.04 based Gerrit image:
docker run -p 8080:8080 gerritforge/gerrit-ubuntu15.04[:version]
NOTE: release is optional. Last released package of the version is installed if the release number is omitted.