blob: 9aa0a3b23e0b482a9eb9d04558efb111e18e1962 [file] [log] [blame]
Edwin Kempin1f556222015-04-22 13:24:39 +02001= User Guide
2
3This is a Gerrit guide that is dedicated to Gerrit end-users. It
4explains the standard Gerrit workflows and how a user can adapt Gerrit
5to personal preferences.
6
7It is expected that readers know about link:http://git-scm.com/[Git]
8and that they are familiar with basic git commands and workflows.
9
10[[gerrit]]
11== What is Gerrit?
12
13Gerrit is a Git server that provides link:access-control.html[access
14control] for the hosted Git repositories and a web front-end for doing
15link:#code-review[code review]. Code review is a core functionality of
16Gerrit, but still it is optional and teams can decide to
17link:#no-code-review[work without code review].
18
19[[tools]]
20== Tools
21
22Gerrit speaks the git protocol. This means in order to work with Gerrit
23you do *not* need to install any Gerrit client, but having a regular
24git client, such as the link:http://git-scm.com/[git command line] or
25link:http://eclipse.org/egit/[EGit] in Eclipse, is sufficient.
26
27Still there are some client-side tools for Gerrit, which can be used
28optionally:
29
30* link:http://eclipse.org/mylyn/[Mylyn Gerrit Connector]: Gerrit
31 integration with Mylyn
Edwin Kempin4cb451e2015-05-08 09:07:51 +020032* link:https://github.com/uwolfer/gerrit-intellij-plugin[Gerrit
33 IntelliJ Plugin]: Gerrit integration with the
34 link:http://www.jetbrains.com/idea/[IntelliJ Platform]
Edwin Kempin1f556222015-04-22 13:24:39 +020035* link:https://play.google.com/store/apps/details?id=com.jbirdvegas.mgerrit[
36 mGerrit]: Android client for Gerrit
37* link:https://github.com/stackforge/gertty[Gertty]: Console-based
38 interface for Gerrit
39
40[[clone]]
41== Clone Gerrit Project
42
43Cloning a Gerrit project is done the same way as cloning any other git
44repository by using the `git clone` command.
45
46.Clone Gerrit Project
47----
48 $ git clone ssh://gerrithost:29418/RecipeBook.git RecipeBook
49 Cloning into RecipeBook...
50----
51
52The URL for cloning the project can be found in the Gerrit web UI
53under `Projects` > `List` > <project-name> > `General`.
54
55For git operations Gerrit supports the link:user-upload.html#ssh[SSH]
56and the link:user-upload.html#http[HTTP/HTTPS] protocols.
57
58[NOTE]
59To use SSH you must link:user-upload.html#configure_ssh[generate an SSH
60key pair and upload the public SSH key to Gerrit].
61
62[[code-review]]
63== Code Review Workflow
64
65With Gerrit _Code Review_ means to link:#review-change[review] every
66commit *before* it is accepted into the code base. The author of a code
67modification link:user-upload.html#push_create[uploads a commit] as a
68change to Gerrit. In Gerrit each change is stored in a
69link:#change-ref[staging area] where it can be checked and reviewed.
70Only when it is approved and submitted it gets applied to the code
71base. If there is feedback on a change, the author can improve the code
72modification by link:#upload-patch-set[amending the commit and
73uploading the new commit as a new patch set]. This way a change is
74improved iteratively and it is applied to the code base only when is
75ready.
76
77[[upload-change]]
78== Upload a Change
79
80Uploading a change to Gerrit is done by pushing a commit to Gerrit. The
81commit must be pushed to a ref in the `refs/for/` namespace which
82defines the target branch: `refs/for/<target-branch>`.
83The magic `refs/for/` prefix allows Gerrit to differentiate commits
84that are pushed for review from commits that are pushed directly into
85the repository, bypassing code review. For the target branch it is
86sufficient to specify the short name, e.g. `master`, but you can also
87specify the fully qualified branch name, e.g. `refs/heads/master`.
88
89.Push for Code Review
90----
91 $ git commit
92 $ git push origin HEAD:refs/for/master
93
94 // this is the same as:
95 $ git commit
96 $ git push origin HEAD:refs/for/refs/heads/master
97----
98
99.Push with bypassing Code Review
100----
101 $ git commit
102 $ git push origin HEAD:master
103
104 // this is the same as:
105 $ git commit
106 $ git push origin HEAD:refs/heads/master
107----
108
109[[push-fails]]
110[NOTE]
111If pushing to Gerrit fails consult the Gerrit documentation that
112explains the link:error-messages.html[error messages].
113
114[[change-ref]]
115When a commit is pushed for review, Gerrit stores it in a staging area
116which is a branch in the special `refs/changes/` namespace. A change
117ref has the format `refs/changes/XX/YYYY/ZZ` where `YYYY` is the
118numeric change number, `ZZ` is the patch set number and `XX` is the
119last two digits of the numeric change number, e.g.
120`refs/changes/20/884120/1`. Understanding the format of this ref is not
121required for working with Gerrit.
122
123[[fetch-change]]
124Using the change ref git clients can fetch the corresponding commit,
125e.g. for local verification.
126
127.Fetch Change
128----
129 $ git fetch https://gerrithost/myProject refs/changes/74/67374/2 && git checkout FETCH_HEAD
130----
131
132[NOTE]
133The fetch command can be copied from the
134link:user-review-ui.html#download[download commands] in the change
135screen.
136
137The `refs/for/` prefix is used to map the Gerrit concept of
138"Pushing for Review" to the git protocol. For the git client it looks
139like every push goes to the same branch, e.g. `refs/for/master` but in
140fact for each commit that is pushed to this ref Gerrit creates a new
141branch under the `refs/changes/` namespace. In addition Gerrit creates
142an open change.
143
144[[change]]
145A change consists of a link:user-changeid.html[Change-Id], meta data
146(owner, project, target branch etc.), one or more patch sets, comments
147and votes. A patch set is a git commit. Each patch set in a change
148represents a new version of the change and replaces the previous patch
149set. Only the latest patch set is relevant. This means all failed
150iterations of a change will never be applied to the target branch, but
151only the last patch set that is approved is integrated.
152
153[[change-id]]
154The Change-Id is important for Gerrit to know whether a commit that is
155pushed for code review should create a new change or whether it should
156create a new patch set for an existing change.
157
158The Change-Id is a SHA-1 that is prefixed with an uppercase `I`. It is
159specified as footer in the commit message (last paragraph):
160
161----
162 Improve foo widget by attaching a bar.
163
164 We want a bar, because it improves the foo by providing more
165 wizbangery to the dowhatimeanery.
166
167 Bug: #42
168 Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5b
169 Signed-off-by: A. U. Thor <author@example.com>
170----
171
172If a commit that has a Change-Id in its commit message is pushed for
173review, Gerrit checks if a change with this Change-Id already exists
174for this project and target branch, and if yes, Gerrit creates a new
175patch set for this change. If not, a new change with the given
176Change-Id is created.
177
178If a commit without Change-Id is pushed for review, Gerrit creates a
179new change and generates a Change-Id for it. Since in this case the
180Change-Id is not included in the commit message, it must be manually
181inserted when a new patch set should be uploaded. Most projects already
182link:project-configuration.html#require-change-id[require a Change-Id]
183when pushing the very first patch set. This reduces the risk of
184accidentally creating a new change instead of uploading a new patch
185set. Any push without Change-Id then fails with
186link:error-missing-changeid.html[missing Change-Id in commit message
187footer]. New patch sets can always be uploaded to a specific change
188(even without any Change-Id) by pushing to the change ref, e.g.
189`refs/changes/74/67374`.
190
191Amending and rebasing a commit preserves the Change-Id so that the new
192commit automatically becomes a new patch set of the existing change,
193when it is pushed for review.
194
195.Push new Patch Set
196----
197 $ git commit --amend
198 $ git push origin HEAD:refs/for/master
199----
200
201Change-Ids are unique for a branch of a project. E.g. commits that fix
202the same issue in different branches should have the same Change-Id,
203which happens automatically if a commit is cherry-picked to another
204branch. This way you can link:user-search.html[search] by the Change-Id
205in the Gerrit web UI to find a fix in all branches.
206
207Change-Ids can be created automatically by installing the `commit-msg`
208hook as described in the link:user-changeid.html#creation[Change-Id
209documentation].
210
211Instead of manually installing the `commit-msg` hook for each git
212repository, you can copy it into the
213link:http://git-scm.com/docs/git-init#_template_directory[git template
214directory]. Then it is automatically copied to every newly cloned
215repository.
216
217[[review-change]]
218== Review Change
219
220After link:#upload-change[uploading a change for review] reviewers can
221inspect it via the Gerrit web UI. Reviewers can see the code delta and
222link:user-review-ui.html#inline-comments[comment directly in the code]
223on code blocks or lines. They can also link:user-review-ui.html#reply[
224post summary comments and vote on review labels]. The
225link:user-review-ui.html[documentation of the review UI] explains the
226screens and controls for doing code reviews.
227
228There are several options to control how patch diffs should be
229rendered. Users can configure their preferences in the
230link:user-review-ui.html#diff-preferences[diff preferences].
231
232[[upload-patch-set]]
233== Upload a new Patch Set
234
235If there is feedback from code review and a change should be improved a
236new patch set with the reworked code should be uploaded.
237
238This is done by amending the commit of the last patch set. If needed
239this commit can be fetched from Gerrit by using the fetch command from
240the link:user-review-ui.html#download[download commands] in the change
241screen.
242
243It is important that the commit message contains the
244link:user-changeid.html[Change-Id] of the change that should be updated
245as a footer (last paragraph). Normally the commit message already
246contains the correct Change-Id and the Change-Id is preserved when the
247commit is amended.
248
249.Push Patch Set
250----
251 // fetch and checkout the change
252 // (checkout command copied from change screen)
253 $ git fetch https://gerrithost/myProject refs/changes/74/67374/2 && git checkout FETCH_HEAD
254
255 // rework the change
256 $ git add <path-of-reworked-file>
257 ...
258
259 // amend commit
260 $ git commit --amend
261
262 // push patch set
263 $ git push origin HEAD:refs/for/master
264----
265
266[NOTE]
267Never amend a commit that is already part of a central branch.
268
269Pushing a new patch set triggers email notification to the reviewers.
270
271[[multiple-features]]
272== Developing multiple Features in parallel
273
274Code review takes time, which can be used by the change author to
275implement other features. Each feature should be implemented in its own
276local feature branch that is based on the current HEAD of the target
277branch. This way there is no dependency to open changes and new
278features can be reviewed and applied independently. If wanted, it is
279also possible to base a new feature on an open change. This will create
280a dependency between the changes in Gerrit and each change can only be
281applied if all its predecessor are applied as well. Dependencies
282between changes can be seen from the
283link:user-review-ui.html#related-changes-tab[Related Changes] tab on
284the change screen.
285
286[[watch]]
287== Watching Projects
288
289To get to know about new changes you can link:user-notify.html#user[
290watch the projects] that you are interested in. For watched projects
291Gerrit sends you email notifications when a change is uploaded or
292modified. You can decide on which events you want to be notified and
293you can filter the notifications by using link:user-search.html[change
294search expressions]. For example '+branch:master file:^.*\.txt$+' would
295send you email notifications only for changes in the master branch that
296touch a 'txt' file.
297
298It is common that the members of a project team watch their own
299projects and then pick the changes that are interesting to them for
300review.
301
302Project owners may also configure
303link:intro-project-owner.html#notifications[notifications on
304project-level].
305
306[[adding-reviewers]]
307== Adding Reviewers
308
309In the link:user-review-ui.html#reviewers[change screen] reviewers can
310be added explicitly to a change. The added reviewer will then be
311notified by email about the review request.
312
313Mainly this functionality is used to request the review of specific
314person who is known to be an expert in the modified code or who is a
315stakeholder of the implemented feature. Normally it is not needed to
316explicitly add reviewers on every change, but you rather rely on the
317project team to watch their project and to process the incoming changes
318by importance, interest, time etc.
319
320There are also link:intro-project-owner.html#reviewers[plugins which
321can add reviewers automatically] (e.g. by configuration or based on git
322blame annotations). If this functionality is required it should be
323discussed with the project owners and the Gerrit administrators.
324
325[[dashboards]]
326== Dashboards
327
328Gerrit supports a wide range of link:user-search.html#search-operators[
329query operators] to search for changes by different criteria, e.g. by
330status, change owner, votes etc.
331
332The page that shows the results of a change query has the change query
333contained in its URL. This means you can bookmark this URL in your
334browser to save the change query. This way it can be easily re-executed
335later.
336
337Several change queries can be also combined into a dashboard. A
338dashboard is a screen in Gerrit that presents the results of several
339change queries in different sections, each section having a descriptive
340title.
341
342A default dashboard is available under `My` > `Changes`. It has
343sections to list outgoing reviews, incoming reviews and recently closed
344changes.
345
346Users can also define link:user-dashboards.html#custom-dashboards[
347custom dashboards]. Dashboards can be bookmarked in a browser so that
348they can be re-executed later.
349
350It is also possible to link:#my-menu[customize the My menu] and add
351menu entries for custom queries or dashboards to it.
352
353Dashboards are very useful to define own views on changes, e.g. you can
354have different dashboards for own contributions, for doing reviews or
355for different sets of projects.
356
357[NOTE]
358You can use the link:user-search.html#limit[limit] and
359link:user-search.html#age[age] query operators to limit the result set
360in a dashboard section. Clicking on the section title executes the
361change query without the `limit` and `age` operator so that you can
362inspect the full result set.
363
364Project owners can also define shared
365link:user-dashboards.html#project-dashboards[dashboards on
366project-level]. The project dashboards can be seen in the web UI under
367`Projects` > `List` > <project-name> > `Dashboards`.
368
369[[submit]]
370== Submit a Change
371
372Submitting a change means that the code modifications of the current
373patch set are applied to the target branch. Submit requires the
374link:access-control.html#category_submit[Submit] access right and is
375done on the change screen by clicking on the
376link:user-review-ui.html#submit[Submit] button.
377
378In order to be submittable changes must first be approved by
379link:user-review-ui.html#vote[voting on the review labels]. By default
380a change can only be submitted if it has a vote with the highest value
381on each review label and no vote with the lowest value (veto vote).
382Projects can configure link:intro-project-owner.html#labels[custom
383labels] and link:intro-project-owner.html#submit-rules[custom submit
384rules] to control when a change becomes submittable.
385
386How the code modification is applied to the target branch when a change
387is submitted is controlled by the
388link:project-configuration.html#submit_type[submit type] which can be
389link:intro-project-owner.html#submit-type[configured on project-level].
390
391Submitting a change may fail with conflicts. In this case you need to
392link:#rebase[rebase] the change locally, resolve the conflicts and
393upload the commit with the conflict resolution as new patch set.
394
395If a change cannot be merged due to path conflicts this is highlighted
396on the change screen by a bold red `Cannot Merge` label.
397
398[[rebase]]
399== Rebase a Change
400
401While a change is in review the HEAD of the target branch can evolve.
402In this case the change can be rebased onto the new HEAD of the target
403branch. When there are no conflicts the rebase can be done directly
404from the link:user-review-ui.html#rebase[change screen], otherwise it
405must be done locally.
406
407.Rebase a Change locally
408----
409 // update the remote tracking branches
410 $ git fetch
411
412 // fetch and checkout the change
413 // (checkout command copied from change screen)
414 $ git fetch https://gerrithost/myProject refs/changes/74/67374/2 && git checkout FETCH_HEAD
415
416 // do the rebase
417 $ git rebase origin/master
418
419 // resolve conflicts if needed and stage the conflict resolution
420 ...
421 $ git add <path-of-file-with-conflicts-resolved>
422
423 // continue the rebase
424 $ git rebase --continue
425
426 // push the commit with the conflict resolution as new patch set
427 $ git push origin HEAD:refs/for/master
428----
429
430Doing a manual rebase is only necessary when there are conflicts that
431cannot be resolved by Gerrit. If manual conflict resolution is needed
432also depends on the link:intro-project-owner.html#submit-type[submit
433type] that is configured for the project.
434
435Generally changes shouldn't be rebased without reason as it
436increases the number of patch sets and creates noise with
437notifications. However if a change is in review for a long time it may
438make sense to rebase it from time to time, so that reviewers can see
439the delta against the current HEAD of the target branch. It also shows
440that there is still an interest in this change.
441
442[NOTE]
443Never rebase commits that are already part of a central branch.
444
445[[abandon]]
446[[restore]]
447== Abandon/Restore a Change
448
449Sometimes during code review a change is found to be bad and it should
450be given up. In this case the change can be
451link:user-review-ui.html#abandon[abandoned] so that it doesn't appear
452in list of open changes anymore.
453
454Abandoned changes can be link:user-review-ui.html#restore[restored] if
455later they are needed again.
456
457[[topics]]
458== Using Topics
459
460Changes can be grouped by topics. This is useful because it allows you
461to easily find related changes by using the
462link:user-search.html#topic[topic search operator]. Also on the change
463screen link:user-review-ui.html#same-topic[changes with the same topic]
464are displayed so that you can easily navigate between them.
465
466Often changes that together implement a feature or a user story are
467group by a topic.
468
469Assigning a topic to a change can be done in the
470link:user-review-ui.html#project-branch-topic[change screen].
471
472It is also possible to link:user-upload.html#topic[set a topic on
Dan Wang17ced402016-08-26 16:42:49 -0700473push], either by appending `%topic=...` to the ref name or through
474the use of the command line flag `--push-option`, aliased to `-o`,
475followed by `topic=...`.
Edwin Kempin1f556222015-04-22 13:24:39 +0200476
477.Set Topic on Push
478----
479 $ git push origin HEAD:refs/for/master%topic=multi-master
Dan Wang17ced402016-08-26 16:42:49 -0700480
481 // this is the same as:
482 $ git push origin HEAD:refs/heads/master -o topic=multi-master
Edwin Kempin1f556222015-04-22 13:24:39 +0200483----
484
David Pursehouse4f5fa2a2017-04-05 12:08:05 +0900485[[private-changes]]
486== Private Changes
Edwin Kempin98ddc8a2017-02-21 11:56:08 +0100487
488Private changes are changes that are only visible to their owners and
489reviewers. Private changes are useful in a number of cases:
490
491* You want to check what the change looks before formal review starts.
492 By marking the change private without reviewers, nobody can't
493 prematurely comment on your changes.
494
495* You want to use Gerrit to sync data between different devices. By
496 creating a private throwaway change without reviewers, you can push
497 from one device, and fetch to another device.
498
499* You want to do code review on a change that has sensitive
500 aspects. By reviewing a security fix in a private change,
501 outsiders can't discover the fix before it is pushed out. Even after
502 merging the change, the review can be kept private.
503
504To create a private change, you push it with the `private` option.
505
506.Push a private change
507----
508 $ git commit
509 $ git push origin HEAD:refs/for/master%private
510----
511
512The change will remain private on subsequent pushes until you specify
513the `remove-private` option. Alternatively, the web UI provides buttons
514to mark a change private and non-private again.
515
David Pursehouse47f9d042017-04-12 14:28:14 +0900516When pushing a private change with a commit that is authored by another
517user, the other user will not be automatically added as a reviewer and
518must be explicitly added.
519
Edwin Kempin98ddc8a2017-02-21 11:56:08 +0100520For CI systems that must verify private changes, a special permission
521can be granted
522(link:access-control.html#category_view_private_changes[View Private Changes]).
523In that case, care should be taken to prevent the CI system from
524exposing secret details.
525
David Pursehouseaf96e692017-05-08 13:24:09 +0900526[[ignore]]
527== Ignoring and Muting Changes
528
529Changes can be ignored, which means they will not appear in the 'Incoming
530Reviews' dashboard and any related email notifications will be suppressed.
531This can be useful when you are added as a reviewer to a change on which
532you do not actively participate in the review, but do not want to completely
533remove yourself.
534
535Alternatively, rather than completely ignoring the change, it can be muted.
536Muting a change means it will always be marked as "reviewed" in dashboards,
537until a new patch set is uploaded.
Edwin Kempin98ddc8a2017-02-21 11:56:08 +0100538
Edwin Kempin1f556222015-04-22 13:24:39 +0200539[[drafts]]
540== Working with Drafts
541
Edwin Kempin98ddc8a2017-02-21 11:56:08 +0100542Drafts is a deprecated feature and will be removed soon. Consider using
543private changes instead.
544
Edwin Kempin1f556222015-04-22 13:24:39 +0200545Changes can be uploaded as drafts. By default draft changes are only
546visible to the change owner. This gives you the possibility to have
547some staging before making your changes visible to the reviewers. Draft
548changes can also be used to backup unfinished changes.
549
550A draft change is created by pushing to the magic
Sven Selbergfb2f3552017-05-09 15:38:18 +0200551`refs/drafts/<target-branch>` ref, or by pushing with the 'draft'
552option to `refs/for/<target-branch>%draft`.
Edwin Kempin1f556222015-04-22 13:24:39 +0200553
554.Push a Draft Change
555----
556 $ git commit
557 $ git push origin HEAD:refs/drafts/master
Sven Selbergfb2f3552017-05-09 15:38:18 +0200558 # or
559 $ git push origin HEAD:refs/for/master%draft
Edwin Kempin1f556222015-04-22 13:24:39 +0200560----
561
562Draft changes have the state link:user-review-ui.html#draft[Draft] and
563can be link:user-review-ui.html#publish[published] or
564link:user-review-ui.html#delete[deleted] from the change screen.
565
566By link:user-review-ui.html#reviewers[adding reviewers] to a draft
567change the change is made visible to these users. This way you can
568collaborate with other users in privacy.
569
570By pushing to `refs/drafts/<target-branch>` you can also upload draft
571patch sets to non-draft changes. Draft patch sets are immediately
572visible to all reviewers of the change, but other users cannot see the
573draft patch set. A draft patch set can be published and deleted in the
574same way as a draft change.
575
576[[inline-edit]]
577== Inline Edit
578
579It is possible to link:user-inline-edit.html#editing-change[edit
580changes inline] directly in the web UI. This is useful to make small
581corrections immediately and publish them as a new patch set.
582
583It is also possible to link:user-inline-edit.html#create-change[create
584new changes inline].
585
586[[project-administration]]
587== Project Administration
588
589Every project has a link:intro-project-owner.html#project-owner[project
590owner] that administrates the project. Project administration includes
591the configuration of the project
592link:intro-project-owner.html#access-rights[access rights], but project
593owners have many more possibilities to customize the workflows for a
594project which are described in the link:intro-project-owner.html[
595project owner guide].
596
597[[no-code-review]]
598== Working without Code Review
599
600Doing code reviews with Gerrit is optional and you can use Gerrit
601without code review as a pure Git server.
602
603.Push with bypassing Code Review
604----
605 $ git commit
606 $ git push origin HEAD:master
607
608 // this is the same as:
609 $ git commit
610 $ git push origin HEAD:refs/heads/master
611----
612
613[NOTE]
614Bypassing code review must be enabled in the project access rights. The
615project owner must allow it by assigning the
616link:access-control.html#category_push_direct[Push] access right on the
617target branch (`refs/heads/<branch-name>`).
618
619[NOTE]
620If you bypass code review you always need to merge/rebase manually if
621the tip of the destination branch has moved. Please keep this in mind
622if you choose to not work with code review because you think it's
623easier to avoid the additional complexity of the review workflow; it
624might actually not be easier.
625
626[NOTE]
627The project owner may enable link:user-upload.html#auto_merge[
628auto-merge on push] to benefit from the automatic merge/rebase on
629server side while pushing directly into the repository.
630
Martin Fick21c557b2015-08-31 16:03:24 -0600631[[user-refs]]
632== User Refs
633
634User configuration data such as link:#preferences[preferences] is
635stored in the `All-Users` project under a per-user ref. The user's
636ref is based on the user's account id which is an integer. The user
637refs are sharded by the last two digits (`+nn+`) in the refname,
638leading to refs of the format `+refs/users/nn/accountid+`.
639
Edwin Kempin1f556222015-04-22 13:24:39 +0200640[[preferences]]
641== Preferences
642
643There are several options to control the rendering in the Gerrit web UI.
644Users can configure their preferences under `Settings` > `Preferences`.
Martin Fick21c557b2015-08-31 16:03:24 -0600645The user's preferences are stored in a `git config` style file named
646`preferences.config` under the link:#user-refs[user's ref] in the
647`All-Users` project.
Edwin Kempin1f556222015-04-22 13:24:39 +0200648
649The following preferences can be configured:
650
Edwin Kempin1f556222015-04-22 13:24:39 +0200651- [[review-category]]`Display In Review Category`:
652+
653This setting controls how the values of the review labels in change
654lists and dashboards are visualized.
655+
656** `None`:
657+
658For each review label only the voting value is shown. Approvals are
David Pursehousea61ee502016-09-06 16:27:09 +0900659rendered as a green check mark icon, vetoes as a red X icon.
Edwin Kempin1f556222015-04-22 13:24:39 +0200660+
661** `Show Name`:
662+
663For each review label the voting value is shown together with the full
664name of the voting user.
665+
666** `Show Email`:
667+
668For each review label the voting value is shown together with the email
669address of the voting user.
670+
671** `Show Username`:
672+
673For each review label the voting value is shown together with the
674username of the voting user.
675+
676** `Show Abbreviated Name`:
677+
678For each review label the voting value is shown together with the
679initials of the full name of the voting user.
680
681- [[page-size]]`Maximum Page Size`:
682+
683The maximum number of entries that are shown on one page, e.g. used
684when paging through changes, projects, branches or groups.
685
686- [[date-time-format]]`Date/Time Format`:
687+
688The format that should be used to render dates and timestamps.
689
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100690- [[email-notifications]]`Email Notifications`:
691+
692This setting controls the email notifications.
693+
694** `Enabled`:
695+
696Email notifications are enabled.
697+
698** [[cc-me]]`CC Me On Comments I Write`:
699+
700Email notifications are enabled and you get notified by email as CC
701on comments that you write yourself.
702+
703** `Disabled`:
704+
705Email notifications are disabled.
706
Patrick Hiesel006578f2017-02-27 16:26:33 +0100707- [[email-format]]`Email Format`:
708+
709This setting controls the email format Gerrit sends. Note that this
710setting has no effect if the administrator has disabled HTML emails
711for the Gerrit instance.
712+
713** `Plaintext Only`:
714+
715Email notifications contain only plaintext content.
716+
717** `HTML and Plaintext`:
718+
719Email notifications contain both HTML and plaintext content.
720
Edwin Kempind540a252016-09-08 13:29:03 +0200721- [[default-base-for-merges]]`Default Base For Merges`:
722+
723This setting controls which base should be pre-selected in the
724`Diff Against` drop-down list when the change screen is opened for a
725merge commit.
726+
727** `Auto Merge`:
728+
729Pre-selects `Auto Merge` in the `Diff Against` drop-down list when the
730change screen is opened for a merge commit.
731+
732** `First Parent`:
733+
734Pre-selects `Parent 1` in the `Diff Against` drop-down list when the
735change screen is opened for a merge commit.
736+
737
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100738- [[diff-view]]`Diff View`:
739+
740Whether the Side-by-Side diff view or the Unified diff view should be
741shown when clicking on a file path in the change screen.
742
Sebastian Schuberth1ab17d82016-07-28 17:21:29 +0200743- [[show-site-header]]`Show Site Header / Footer`:
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100744+
Sebastian Schuberth1ab17d82016-07-28 17:21:29 +0200745Whether the site header and footer should be shown.
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100746
Edwin Kempin1f556222015-04-22 13:24:39 +0200747- [[relative-dates]]`Show Relative Dates In Changes Table`:
748+
749Whether timestamps in change lists and dashboards should be shown as
750relative timestamps, e.g. '12 days ago' instead of absolute timestamps
751such as 'Apr 15'.
752
753- [[change-size-bars]]`Show Change Sizes As Colored Bars`:
754+
755Whether change sizes should be visualized as colored bars. If disabled
756the numbers of added and deleted lines are shown as text, e.g.
757'+297, -63'.
758
759- [[show-change-number]]`Show Change Number In Changes Table`:
760+
761Whether in change lists and dashboards an `ID` column with the numeric
762change IDs should be shown.
763
764- [[mute-common-path-prefixes]]`Mute Common Path Prefixes In File List`:
765+
766Whether common path prefixes in the file list on the change screen
767should be link:user-review-ui.html#repeating-path-segments[grayed out].
768
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100769- [[inline-signed-off]]`Insert Signed-off-by Footer For Inline Edit Changes`:
Edwin Kempin1f556222015-04-22 13:24:39 +0200770+
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100771Whether a `Signed-off-by` footer should be automatically inserted into
772changes that are created from the web UI (e.g. by the `Create Change`
773and `Edit Config` buttons on the project screen, and the `Follow-Up`
774button on the change screen).
Edwin Kempin1f556222015-04-22 13:24:39 +0200775
Dave Borowitzd6ee48e2017-04-27 10:32:42 -0400776- [[publish-comments-on-push]]`Publish Draft Comments When a Change Is Updated by Push`:
777+
778Whether to publish any outstanding draft comments by default when pushing
779updates to open changes. This preference just sets the default; the behavior can
780still be overridden using a link:user-upload.html#publish-comments[push option].
781
Michael Zhou2e9aca12016-03-17 22:45:40 -0400782- [[use-flash]]`Use Flash Clipboard Widget`:
783+
784Whether the Flash clipboard widget should be used. If enabled and the Flash
785plugin is available, Gerrit offers a copy-to-clipboard icon next to IDs and
786commands that need to be copied frequently, such as the Change-Ids, commit IDs
787and download commands. Note that this option is only shown if the Flash plugin
788is available and the JavaScript Clipboard API is unavailable.
789
Edwin Kempin1f556222015-04-22 13:24:39 +0200790[[my-menu]]
791In addition it is possible to customize the menu entries of the `My`
792menu. This can be used to make the navigation to frequently used
793screens, e.g. configured link:#dashboards[dashboards], quick.
794
Patrick Hiesel4362c4f2017-02-14 11:52:09 +0100795[[reply-by-email]]
796== Reply by Email
797
798Gerrit sends out email notifications to users and supports parsing back replies
David Pursehouseaae0c692017-04-04 15:10:06 +0900799on some of them (when link:config-gerrit.html#receiveemail[configured]).
Patrick Hiesel4362c4f2017-02-14 11:52:09 +0100800
801Gerrit supports replies on these notification emails:
802
803* Notifications about new comments
804* Notifications about new labels that were applied or removed
805
806While Gerrit supports a wide range of email clients, the following ones have
807been tested and are known to work:
808
809* Gmail
810* Gmail Mobile
811
812Gerrit supports parsing back all comment types that can be applied to a change
813via the WebUI:
814
815* Change messages
816* Inline comments
817* File comments
818
819Please note that comments can only be sent in reply to a comment in the original
820notification email, while the change message is independent of those.
821
822Gerrit supports parsing a user's reply from both HTML and plaintext. Please note
823that some email clients extract the text from the HTML email they have received
824and send this back as a quoted reply if you have set the client to plaintext
825mode. In this case, Gerrit only supports parsing a change message. To work
826around this issue, consider setting a <<email-format,User Preference>> to
827receive only plaintext emails.
828
829Example notification:
830----
831Some User has posted comments on this change.
832(https://gerrit-review.googlesource.com/123123 )
833
834Change subject: My new change
835......................................................................
836
837
838Patch Set 3:
839
840Just a couple of smaller things I found.
841
842https://gerrit-review.googlesource.com/#/c/123123/3/MyFile.java
843File
844MyFile.java:
845
846https://gerrit-review.googlesource.com/#/c/123123/3/MyFile@420
847PS3, Line 420: someMethodCall(param);
848Seems to be failing the tests.
849
850
851--
852To view, visit https://gerrit-review.googlesource.com/123123
853To unsubscribe, visit https://gerrit-review.googlesource.com/settings
854
855(Footers omitted for brevity, must be included in all emails)
856----
857
858Example response from the user:
859----
860Thanks, I'll fix it.
861> Some User has posted comments on this change.
862> (https://gerrit-review.googlesource.com/123123 )
863>
864> Change subject: My new change
865> ......................................................................
866>
867>
868> Patch Set 3:
869>
870> Just a couple of smaller things I found.
871>
872> https://gerrit-review.googlesource.com/#/c/123123/3/MyFile.java
873> File
874> MyFile.java:
875Rename this file to File.java
876>
877> https://gerrit-review.googlesource.com/#/c/123123/3/MyFile@420
878> PS3, Line 420: someMethodCall(param);
879> Seems to be failing the tests.
880>
881Yeah, I see why, let me try again.
882>
883> --
884> To view, visit https://gerrit-review.googlesource.com/123123
885> To unsubscribe, visit https://gerrit-review.googlesource.com/settings
886>
887> (Footers omitted for brevity, must be included in all emails)
888----
889
890In this case, Gerrit will persist a change message ("Thanks, I'll fix it."),
891a file comment ("Rename this file to File.java") as well as a reply to an
892inline comment ("Yeah, I see why, let me try again.").
893
Edwin Kempin1f556222015-04-22 13:24:39 +0200894
895GERRIT
896------
897Part of link:index.html[Gerrit Code Review]
898
899SEARCHBOX
900---------