blob: 2b6ac2297398cfd54d496973e28d74263d4a7403 [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]
Gert van Dijkdc4f8d12017-08-27 21:14:23 +020059To use SSH you may need to link:user-upload.html#ssh[configure your SSH public
60key in your `Settings`].
Edwin Kempin1f556222015-04-22 13:24:39 +020061
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
Sven Selbergc956c412017-09-27 08:01:29 +0200491* You want to check what the change looks like before formal review starts.
David Pursehouseb7f9e2a2017-09-27 13:31:30 +0000492 By marking the change private without reviewers, nobody can
Edwin Kempin98ddc8a2017-02-21 11:56:08 +0100493 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[[inline-edit]]
540== Inline Edit
541
542It is possible to link:user-inline-edit.html#editing-change[edit
543changes inline] directly in the web UI. This is useful to make small
544corrections immediately and publish them as a new patch set.
545
546It is also possible to link:user-inline-edit.html#create-change[create
547new changes inline].
548
549[[project-administration]]
550== Project Administration
551
552Every project has a link:intro-project-owner.html#project-owner[project
553owner] that administrates the project. Project administration includes
554the configuration of the project
555link:intro-project-owner.html#access-rights[access rights], but project
556owners have many more possibilities to customize the workflows for a
557project which are described in the link:intro-project-owner.html[
558project owner guide].
559
560[[no-code-review]]
561== Working without Code Review
562
563Doing code reviews with Gerrit is optional and you can use Gerrit
564without code review as a pure Git server.
565
566.Push with bypassing Code Review
567----
568 $ git commit
569 $ git push origin HEAD:master
570
571 // this is the same as:
572 $ git commit
573 $ git push origin HEAD:refs/heads/master
574----
575
576[NOTE]
577Bypassing code review must be enabled in the project access rights. The
578project owner must allow it by assigning the
579link:access-control.html#category_push_direct[Push] access right on the
580target branch (`refs/heads/<branch-name>`).
581
582[NOTE]
583If you bypass code review you always need to merge/rebase manually if
584the tip of the destination branch has moved. Please keep this in mind
585if you choose to not work with code review because you think it's
586easier to avoid the additional complexity of the review workflow; it
587might actually not be easier.
588
589[NOTE]
590The project owner may enable link:user-upload.html#auto_merge[
591auto-merge on push] to benefit from the automatic merge/rebase on
592server side while pushing directly into the repository.
593
Martin Fick21c557b2015-08-31 16:03:24 -0600594[[user-refs]]
595== User Refs
596
597User configuration data such as link:#preferences[preferences] is
598stored in the `All-Users` project under a per-user ref. The user's
599ref is based on the user's account id which is an integer. The user
600refs are sharded by the last two digits (`+nn+`) in the refname,
601leading to refs of the format `+refs/users/nn/accountid+`.
602
Edwin Kempin1f556222015-04-22 13:24:39 +0200603[[preferences]]
604== Preferences
605
606There are several options to control the rendering in the Gerrit web UI.
607Users can configure their preferences under `Settings` > `Preferences`.
Martin Fick21c557b2015-08-31 16:03:24 -0600608The user's preferences are stored in a `git config` style file named
609`preferences.config` under the link:#user-refs[user's ref] in the
610`All-Users` project.
Edwin Kempin1f556222015-04-22 13:24:39 +0200611
612The following preferences can be configured:
613
Edwin Kempin1f556222015-04-22 13:24:39 +0200614- [[review-category]]`Display In Review Category`:
615+
616This setting controls how the values of the review labels in change
617lists and dashboards are visualized.
618+
619** `None`:
620+
621For each review label only the voting value is shown. Approvals are
David Pursehousea61ee502016-09-06 16:27:09 +0900622rendered as a green check mark icon, vetoes as a red X icon.
Edwin Kempin1f556222015-04-22 13:24:39 +0200623+
624** `Show Name`:
625+
626For each review label the voting value is shown together with the full
627name of the voting user.
628+
629** `Show Email`:
630+
631For each review label the voting value is shown together with the email
632address of the voting user.
633+
634** `Show Username`:
635+
636For each review label the voting value is shown together with the
637username of the voting user.
638+
639** `Show Abbreviated Name`:
640+
641For each review label the voting value is shown together with the
642initials of the full name of the voting user.
643
644- [[page-size]]`Maximum Page Size`:
645+
646The maximum number of entries that are shown on one page, e.g. used
647when paging through changes, projects, branches or groups.
648
649- [[date-time-format]]`Date/Time Format`:
650+
651The format that should be used to render dates and timestamps.
652
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100653- [[email-notifications]]`Email Notifications`:
654+
655This setting controls the email notifications.
656+
657** `Enabled`:
658+
659Email notifications are enabled.
660+
Logan Hanksc88e9612017-09-25 10:17:56 -0700661** [[cc-me]]`Every comment`:
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100662+
663Email notifications are enabled and you get notified by email as CC
664on comments that you write yourself.
665+
666** `Disabled`:
667+
668Email notifications are disabled.
669
Patrick Hiesel006578f2017-02-27 16:26:33 +0100670- [[email-format]]`Email Format`:
671+
672This setting controls the email format Gerrit sends. Note that this
673setting has no effect if the administrator has disabled HTML emails
674for the Gerrit instance.
675+
676** `Plaintext Only`:
677+
678Email notifications contain only plaintext content.
679+
680** `HTML and Plaintext`:
681+
682Email notifications contain both HTML and plaintext content.
683
Edwin Kempind540a252016-09-08 13:29:03 +0200684- [[default-base-for-merges]]`Default Base For Merges`:
685+
686This setting controls which base should be pre-selected in the
687`Diff Against` drop-down list when the change screen is opened for a
688merge commit.
689+
690** `Auto Merge`:
691+
692Pre-selects `Auto Merge` in the `Diff Against` drop-down list when the
693change screen is opened for a merge commit.
694+
695** `First Parent`:
696+
697Pre-selects `Parent 1` in the `Diff Against` drop-down list when the
698change screen is opened for a merge commit.
699+
700
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100701- [[diff-view]]`Diff View`:
702+
703Whether the Side-by-Side diff view or the Unified diff view should be
704shown when clicking on a file path in the change screen.
705
Sebastian Schuberth1ab17d82016-07-28 17:21:29 +0200706- [[show-site-header]]`Show Site Header / Footer`:
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100707+
Sebastian Schuberth1ab17d82016-07-28 17:21:29 +0200708Whether the site header and footer should be shown.
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100709
Edwin Kempin1f556222015-04-22 13:24:39 +0200710- [[relative-dates]]`Show Relative Dates In Changes Table`:
711+
712Whether timestamps in change lists and dashboards should be shown as
713relative timestamps, e.g. '12 days ago' instead of absolute timestamps
714such as 'Apr 15'.
715
716- [[change-size-bars]]`Show Change Sizes As Colored Bars`:
717+
718Whether change sizes should be visualized as colored bars. If disabled
719the numbers of added and deleted lines are shown as text, e.g.
720'+297, -63'.
721
722- [[show-change-number]]`Show Change Number In Changes Table`:
723+
724Whether in change lists and dashboards an `ID` column with the numeric
725change IDs should be shown.
726
727- [[mute-common-path-prefixes]]`Mute Common Path Prefixes In File List`:
728+
729Whether common path prefixes in the file list on the change screen
730should be link:user-review-ui.html#repeating-path-segments[grayed out].
731
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100732- [[inline-signed-off]]`Insert Signed-off-by Footer For Inline Edit Changes`:
Edwin Kempin1f556222015-04-22 13:24:39 +0200733+
Edwin Kempin717aa5d2016-03-16 16:29:43 +0100734Whether a `Signed-off-by` footer should be automatically inserted into
735changes that are created from the web UI (e.g. by the `Create Change`
736and `Edit Config` buttons on the project screen, and the `Follow-Up`
737button on the change screen).
Edwin Kempin1f556222015-04-22 13:24:39 +0200738
Dave Borowitzd6ee48e2017-04-27 10:32:42 -0400739- [[publish-comments-on-push]]`Publish Draft Comments When a Change Is Updated by Push`:
740+
741Whether to publish any outstanding draft comments by default when pushing
742updates to open changes. This preference just sets the default; the behavior can
743still be overridden using a link:user-upload.html#publish-comments[push option].
744
Michael Zhou2e9aca12016-03-17 22:45:40 -0400745- [[use-flash]]`Use Flash Clipboard Widget`:
746+
747Whether the Flash clipboard widget should be used. If enabled and the Flash
748plugin is available, Gerrit offers a copy-to-clipboard icon next to IDs and
749commands that need to be copied frequently, such as the Change-Ids, commit IDs
750and download commands. Note that this option is only shown if the Flash plugin
751is available and the JavaScript Clipboard API is unavailable.
752
Edwin Kempin1f556222015-04-22 13:24:39 +0200753[[my-menu]]
754In addition it is possible to customize the menu entries of the `My`
755menu. This can be used to make the navigation to frequently used
756screens, e.g. configured link:#dashboards[dashboards], quick.
757
Patrick Hiesel4362c4f2017-02-14 11:52:09 +0100758[[reply-by-email]]
759== Reply by Email
760
761Gerrit sends out email notifications to users and supports parsing back replies
David Pursehouseaae0c692017-04-04 15:10:06 +0900762on some of them (when link:config-gerrit.html#receiveemail[configured]).
Patrick Hiesel4362c4f2017-02-14 11:52:09 +0100763
764Gerrit supports replies on these notification emails:
765
766* Notifications about new comments
767* Notifications about new labels that were applied or removed
768
769While Gerrit supports a wide range of email clients, the following ones have
770been tested and are known to work:
771
772* Gmail
773* Gmail Mobile
774
775Gerrit supports parsing back all comment types that can be applied to a change
776via the WebUI:
777
778* Change messages
779* Inline comments
780* File comments
781
782Please note that comments can only be sent in reply to a comment in the original
783notification email, while the change message is independent of those.
784
785Gerrit supports parsing a user's reply from both HTML and plaintext. Please note
786that some email clients extract the text from the HTML email they have received
787and send this back as a quoted reply if you have set the client to plaintext
788mode. In this case, Gerrit only supports parsing a change message. To work
789around this issue, consider setting a <<email-format,User Preference>> to
790receive only plaintext emails.
791
792Example notification:
793----
794Some User has posted comments on this change.
795(https://gerrit-review.googlesource.com/123123 )
796
797Change subject: My new change
798......................................................................
799
800
801Patch Set 3:
802
803Just a couple of smaller things I found.
804
805https://gerrit-review.googlesource.com/#/c/123123/3/MyFile.java
806File
807MyFile.java:
808
809https://gerrit-review.googlesource.com/#/c/123123/3/MyFile@420
810PS3, Line 420: someMethodCall(param);
811Seems to be failing the tests.
812
813
814--
815To view, visit https://gerrit-review.googlesource.com/123123
816To unsubscribe, visit https://gerrit-review.googlesource.com/settings
817
818(Footers omitted for brevity, must be included in all emails)
819----
820
821Example response from the user:
822----
823Thanks, I'll fix it.
824> Some User has posted comments on this change.
825> (https://gerrit-review.googlesource.com/123123 )
826>
827> Change subject: My new change
828> ......................................................................
829>
830>
831> Patch Set 3:
832>
833> Just a couple of smaller things I found.
834>
835> https://gerrit-review.googlesource.com/#/c/123123/3/MyFile.java
836> File
837> MyFile.java:
838Rename this file to File.java
839>
840> https://gerrit-review.googlesource.com/#/c/123123/3/MyFile@420
841> PS3, Line 420: someMethodCall(param);
842> Seems to be failing the tests.
843>
844Yeah, I see why, let me try again.
845>
846> --
847> To view, visit https://gerrit-review.googlesource.com/123123
848> To unsubscribe, visit https://gerrit-review.googlesource.com/settings
849>
850> (Footers omitted for brevity, must be included in all emails)
851----
852
853In this case, Gerrit will persist a change message ("Thanks, I'll fix it."),
854a file comment ("Rename this file to File.java") as well as a reply to an
855inline comment ("Yeah, I see why, let me try again.").
856
Edwin Kempin1f556222015-04-22 13:24:39 +0200857
858GERRIT
859------
860Part of link:index.html[Gerrit Code Review]
861
862SEARCHBOX
863---------