refs/notes/review
is a special reference that this plugin creates on repositories to store information about code reviews.
When a repository is cloned from Gerrit, the refs/notes/review
reference is not included by default. It has to be manually fetched:
$ git fetch origin refs/notes/review:refs/notes/review
It is also possible to configure git to always fetch refs/notes/review
:
$ git config --add remote.origin.fetch refs/notes/review:refs/notes/review $ git fetch
When refs/notes/review
is fetched on a repository, the review notes information can be included in the git log output:
$ git log --show-notes=review
For each commit, this plugin stores the following review information in refs/notes/review
:
The name and email address of the Gerrit user that submitted the change in RFC 2822 format.
Submitted-by: Random J Developer <random@developer.example.org>
The time the commit was submitted in RFC 2822 time stamp format.
Submitted-at: Mon, 25 Jun 2012 16:15:57 +0200
The URL to the change on the Gerrit server.
Reviewed-on: http://path.to.gerrit/12345
Review label and score, and the name and email address of the Gerrit user that gave it in RFC 2822 format:
Code-Review+2: A. N. Other <another@developer.example.org> Verified+1: A. N. Other <another@developer.example.org>
Commonly used review labels are “Code-Review” and “Verified”, but any label configured in Gerrit can be included.
All review labels and scores present on the change at the time of submit are included.
The number of comments at the time when the change was submitted.
Comments-Total: 5 Comments-Unresolved: 1
Comments-Total is the total number of comments in all threads (also including robot comments), Comments-Unresolved is the number of comment threads which are still unresolved.
These lines are only added when there are comments.
The name of the project in which the commit was made.
Project: kernel/common
The name of the branch on which the commit was made.
Branch: refs/heads/master