Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = Gerrit Code Review - Project Configuration File Format |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 2 | |
| 3 | This page explains the storage format of Gerrit's project configuration |
| 4 | and access control models. |
| 5 | |
| 6 | The web UI access control panel is a front end for human-readable |
| 7 | configuration files under the +refs/meta/config+ namespace in the |
| 8 | affected project. Direct manipulation of these files is mainly |
| 9 | relevant in an automation scenario of the access controls. |
| 10 | |
| 11 | |
Edwin Kempin | 329416c | 2022-07-25 15:52:35 +0200 | [diff] [blame] | 12 | [[refs-meta-config]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 13 | == The +refs/meta/config+ namespace |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 14 | |
| 15 | The namespace contains three different files that play different |
| 16 | roles in the permission model. With read permission to that reference, |
| 17 | it is possible to fetch the +refs/meta/config+ reference to a local |
| 18 | repository. A nice side effect is that you can also upload changes |
| 19 | to project permissions and review them just like with regular code |
| 20 | changes. The preview changes option is also provided on the UI. Please note |
| 21 | that you will have to configure push rights for the +refs/meta/config+ name |
| 22 | space if you'd like to use the possibility to automate permission updates. |
| 23 | |
Björn Pedersen | d169b6d | 2016-08-31 17:56:45 +0200 | [diff] [blame] | 24 | == Property inheritance |
| 25 | |
| 26 | If a property is set to INHERIT, then the value from the parent project is |
| 27 | used. If the property is not set in any parent project, the default value is |
| 28 | FALSE. |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 29 | |
| 30 | [[file-project_config]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 31 | == The file +project.config+ |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 32 | |
| 33 | The +project.config+ file contains the link between groups and their |
| 34 | permitted actions on reference patterns in this project and any projects |
| 35 | that inherit its permissions. |
| 36 | |
| 37 | The format in this file corresponds to the Git config file format, so |
| 38 | if you want to automate your permissions it is a good idea to use the |
| 39 | +git config+ command when writing to the file. This way you know you |
| 40 | don't accidentally break the format of the file. |
| 41 | |
| 42 | Here follows a +git config+ command example: |
| 43 | |
| 44 | ---- |
| 45 | $ git config -f project.config project.description "Rights inherited by all other projects" |
| 46 | ---- |
| 47 | |
| 48 | Below you will find an example of the +project.config+ file format: |
| 49 | |
| 50 | ---- |
| 51 | [project] |
| 52 | description = Rights inherited by all other projects |
| 53 | [access "refs/*"] |
| 54 | read = group Administrators |
David Myllykangas | b3ccec6 | 2015-01-21 15:41:13 +0100 | [diff] [blame] | 55 | [access "refs/heads/*"] |
| 56 | label-Your-Label-Here = -1..+1 group Administrators |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 57 | [capability] |
| 58 | administrateServer = group Administrators |
| 59 | [receive] |
| 60 | requireContributorAgreement = false |
David Myllykangas | b3ccec6 | 2015-01-21 15:41:13 +0100 | [diff] [blame] | 61 | [label "Your-Label-Here"] |
| 62 | function = MaxWithBlock |
| 63 | value = -1 Your -1 Description |
| 64 | value = 0 Your No score Description |
| 65 | value = +1 Your +1 Description |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 66 | ---- |
| 67 | |
| 68 | As you can see, there are several sections. |
| 69 | |
| 70 | The link:#project-section[+project+ section] appears once per project. |
| 71 | |
| 72 | The link:#access-section[+access+ section] appears once per reference pattern, |
Jonathan Nieder | 5758f18 | 2015-03-30 11:28:55 -0700 | [diff] [blame] | 73 | such as `+refs/*+` or `+refs/heads/*+`. Only one access section per pattern is |
David Pursehouse | acb5c1d | 2016-08-29 10:29:57 +0900 | [diff] [blame] | 74 | allowed. |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 75 | |
| 76 | The link:#receive-section[+receive+ section] appears once per project. |
| 77 | |
| 78 | The link:#submit-section[+submit+ section] appears once per project. |
| 79 | |
| 80 | The link:#capability-section[+capability+] section only appears once, and only |
| 81 | in the +All-Projects+ repository. It controls core features that are configured |
David Pursehouse | acb5c1d | 2016-08-29 10:29:57 +0900 | [diff] [blame] | 82 | on a global level. |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 83 | |
David Myllykangas | b3ccec6 | 2015-01-21 15:41:13 +0100 | [diff] [blame] | 84 | The link:#label-section[+label+] section can appear multiple times. You can |
| 85 | also redefine the text and behavior of the built in label types `Code-Review` |
| 86 | and `Verified`. |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 87 | |
Edwin Kempin | 424f96c6 | 2016-10-13 09:00:55 +0200 | [diff] [blame] | 88 | Optionally a +commentlink+ section can be added to define project-specific |
| 89 | comment links. The +commentlink+ section has the same format as the |
| 90 | link:config-gerrit.html#commentlink[+commentlink+ section in gerrit.config] |
| 91 | which is used to define global comment links. |
| 92 | |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 93 | [[project-section]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 94 | === Project section |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 95 | |
| 96 | The project section includes configuration of project settings. |
| 97 | |
| 98 | These are the keys: |
| 99 | |
Changcheng Xiao | 5ecb642 | 2019-01-15 17:17:04 +0100 | [diff] [blame] | 100 | [[description]]description:: |
| 101 | + |
| 102 | A description for the project. |
| 103 | |
Edwin Kempin | 1fd0854 | 2019-06-26 10:20:29 +0200 | [diff] [blame] | 104 | [[state]]state:: |
Changcheng Xiao | 5ecb642 | 2019-01-15 17:17:04 +0100 | [diff] [blame] | 105 | + |
| 106 | This setting defines the state of the project. A project can have the |
| 107 | following states: |
| 108 | |
| 109 | - `Active`: |
| 110 | + |
| 111 | The project is active and users can see and modify the project according |
| 112 | to their access rights on the project. |
| 113 | |
| 114 | - `Read Only`: |
| 115 | + |
| 116 | The project is read only and all modifying operations on it are |
| 117 | disabled. E.g. this means that pushing to this project fails for all |
| 118 | users even if they have push permissions assigned on it. |
| 119 | + |
| 120 | Setting a project to this state is an easy way to temporary close a |
| 121 | project, as you can keep all write access rights in place and they will |
| 122 | become active again as soon as the project state is set back to |
| 123 | `Active`. |
| 124 | + |
| 125 | This state also makes sense if a project was moved to another location. |
| 126 | In this case all new development should happen in the new project and |
| 127 | you want to prevent that somebody accidentally works on the old |
| 128 | project, while keeping the old project around for old references. |
| 129 | |
| 130 | - `Hidden`: |
| 131 | + |
| 132 | The project is hidden and only visible to project owners. Other users |
| 133 | are not able to see the project even if they have read permissions |
| 134 | granted on the project. |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 135 | |
| 136 | |
| 137 | [[receive-section]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 138 | === Receive section |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 139 | |
| 140 | The receive section includes configuration of project-specific |
| 141 | receive settings: |
| 142 | |
| 143 | [[receive.requireContributorAgreement]]receive.requireContributorAgreement:: |
| 144 | + |
| 145 | Controls whether or not a user must complete a contributor agreement before |
Edwin Kempin | 51e7851 | 2022-04-06 12:49:04 +0200 | [diff] [blame] | 146 | they can upload changes. Default is `INHERIT`. If `All-Projects` enables this |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 147 | option then the dependent project must set it to false if users are not |
| 148 | required to sign a contributor agreement prior to submitting changes for that |
| 149 | specific project. To use that feature the global option in `gerrit.config` |
| 150 | must be enabled: |
| 151 | link:config-gerrit.html#auth.contributorAgreements[auth.contributorAgreements]. |
| 152 | |
| 153 | [[receive.requireSignedOffBy]]receive.requireSignedOffBy:: |
| 154 | + |
| 155 | Sign-off can be a requirement for some projects (for example Linux kernel uses |
| 156 | it). Sign-off is a line at the end of the commit message which certifies who |
| 157 | is the author of the commit. Its main purpose is to improve tracking of who |
| 158 | did what, especially with patches. Default is `INHERIT`, which means that this |
| 159 | property is inherited from the parent project. |
| 160 | |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 161 | [[receive.requireChangeId]]receive.requireChangeId:: |
| 162 | + |
| 163 | The `Require Change-Id in commit message` option defines whether a |
| 164 | link:user-changeid.html[Change-Id] in the commit message is required |
| 165 | for pushing a commit for review. If this option is set, trying to push |
| 166 | a commit for review that doesn't contain a Change-Id in the commit |
| 167 | message fails with link:error-missing-changeid.html[missing Change-Id |
| 168 | in commit message footer]. |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 169 | + |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 170 | It is recommended to set this option and use a |
| 171 | link:user-changeid.html#create[commit-msg hook] (or other client side |
| 172 | tooling like EGit) to automatically generate Change-Id's for new |
| 173 | commits. This way the Change-Id is automatically in place when changes |
| 174 | are reworked or rebased and uploading new patch sets gets easy. |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 175 | + |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 176 | If this option is not set, commits can be uploaded without a Change-Id, |
| 177 | but then users have to remember to copy the assigned Change-Id from the |
| 178 | change screen and insert it manually into the commit message when they |
| 179 | want to upload a second patch set. |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 180 | + |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 181 | Default is `INHERIT`, which means that this property is inherited from |
| 182 | the parent project. The global default for new hosts is `true` |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 183 | + |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 184 | This option is deprecated and future releases will behave as if this |
| 185 | is always `true`. |
| 186 | |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 187 | [[receive.maxObjectSizeLimit]]receive.maxObjectSizeLimit:: |
| 188 | + |
| 189 | Maximum allowed Git object size that receive-pack will accept. If an object |
| 190 | is larger than the given size the pack-parsing will abort and the push |
| 191 | operation will fail. If set to zero then there is no limit. |
| 192 | + |
| 193 | Project owners can use this setting to prevent developers from pushing |
David Pursehouse | 2e54868 | 2018-08-01 15:12:47 +0200 | [diff] [blame] | 194 | objects which are too large to Gerrit. This setting can also be set in |
| 195 | `gerrit.config` globally (link:config-gerrit.html#receive.maxObjectSizeLimit[ |
| 196 | receive.maxObjectSizeLimit]). |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 197 | + |
David Pursehouse | d508ef0 | 2018-08-03 15:09:56 +0100 | [diff] [blame] | 198 | The project specific setting in `project.config` may not set a value higher |
| 199 | than the global limit (if configured). In other words, it is only honored when |
| 200 | it further reduces the global limit. |
| 201 | + |
David Pursehouse | 3f9c740 | 2018-09-05 18:43:03 +0900 | [diff] [blame] | 202 | When link:config-gerrit.html#receive.inheritProjectMaxObjectSizeLimit[ |
| 203 | `receive.inheritProjectmaxObjectSizeLimit`] is enabled in the global config, |
| 204 | the value is inherited from the parent project. Otherwise, it is not inherited |
| 205 | and must be explicitly set per project. |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 206 | + |
| 207 | Default is zero. |
| 208 | + |
| 209 | Common unit suffixes of k, m, or g are supported. |
| 210 | |
Rob Ward | 2cf1295 | 2014-01-26 20:38:12 +0000 | [diff] [blame] | 211 | [[receive.checkReceivedObjects]]receive.checkReceivedObjects:: |
| 212 | + |
| 213 | Controls whether or not the JGit functionality for checking received objects |
| 214 | is enabled. |
| 215 | + |
| 216 | By default Gerrit checks the validity of git objects. Setting this variable to |
| 217 | false should not be used unless a project with history containing invalid |
| 218 | objects needs to be pushed into a Gerrit repository. |
| 219 | + |
| 220 | This functionality is provided as some other git implementations have allowed |
| 221 | bad history to be written into git repositories. If these repositories need pushing |
| 222 | up to Gerrit then the JGit checks need to be disabled. |
| 223 | + |
| 224 | The default value for this is true, false disables the checks. |
| 225 | |
Dave Borowitz | 5170e0f | 2015-06-18 21:05:29 -0400 | [diff] [blame] | 226 | [[receive.enableSignedPush]]receive.enableSignedPush:: |
| 227 | + |
| 228 | Controls whether server-side signed push validation is enabled on the |
| 229 | project. Only has an effect if signed push validation is enabled on the |
| 230 | server; see the link:config-gerrit.html#receive.enableSignedPush[global |
| 231 | configuration] for details. |
| 232 | + |
| 233 | Default is `INHERIT`, which means that this property is inherited from |
| 234 | the parent project. |
| 235 | |
Dave Borowitz | 0543c73 | 2015-10-20 10:35:26 -0400 | [diff] [blame] | 236 | [[receive.requireSignedPush]]receive.requireSignedPush:: |
| 237 | + |
| 238 | Controls whether server-side signed push validation is required on the |
| 239 | project. Only has an effect if signed push validation is enabled on the |
David Pursehouse | ab5383f | 2018-09-14 08:23:10 +0900 | [diff] [blame] | 240 | server, and link:#receive.enableSignedPush[`receive.enableSignedPush`] is |
| 241 | set on the project. See the |
| 242 | link:config-gerrit.html#receive.enableSignedPush[global configuration] |
| 243 | for details. |
Dave Borowitz | 0543c73 | 2015-10-20 10:35:26 -0400 | [diff] [blame] | 244 | + |
| 245 | Default is `INHERIT`, which means that this property is inherited from |
| 246 | the parent project. |
| 247 | |
Saša Živkov | 225b7a7 | 2015-11-17 17:37:43 +0100 | [diff] [blame] | 248 | [[receive.rejectImplicitMerges]]receive.rejectImplicitMerges:: |
| 249 | + |
| 250 | Controls whether a check for implicit merges will be performed when changes are |
| 251 | pushed for review. An implicit merge is a case where merging an open change |
| 252 | would implicitly merge another branch into the target branch. Typically, this |
| 253 | happens when a change is done on master and, by mistake, pushed to a stable branch |
| 254 | for review. When submitting such change, master would be implicitly merged into |
| 255 | stable without anyone noticing that. When this option is set to 'true' Gerrit |
| 256 | will reject the push if an implicit merge is detected. |
| 257 | + |
| 258 | This check is only done for non-merge commits, merge commits are not subject of |
| 259 | the implicit merge check. |
| 260 | + |
| 261 | Default is `INHERIT`, which means that this property is inherited from |
| 262 | the parent project. |
| 263 | |
Changcheng Xiao | 81a0df9 | 2019-01-15 18:27:58 +0100 | [diff] [blame] | 264 | [[receive.createNewChangeForAllNotInTarget]]receive.createNewChangeForAllNotInTarget:: |
| 265 | + |
Edwin Kempin | 3a5f874 | 2021-06-15 09:18:34 +0200 | [diff] [blame] | 266 | This option provides a convenience for selecting |
| 267 | link:user-upload.html#base[the merge base] by setting it automatically |
| 268 | to the target branch's tip so you can create new changes for all |
| 269 | commits not in the target branch. |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 270 | + |
Changcheng Xiao | 81a0df9 | 2019-01-15 18:27:58 +0100 | [diff] [blame] | 271 | This option is disabled if the tip of the push is a merge commit. |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 272 | + |
Changcheng Xiao | 81a0df9 | 2019-01-15 18:27:58 +0100 | [diff] [blame] | 273 | This option also only works if there are no merge commits in the |
| 274 | commit chain, in such cases it fails warning the user that such |
| 275 | pushes can only be performed by manually specifying |
| 276 | link:user-upload.html#base[bases] |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 277 | + |
Changcheng Xiao | 81a0df9 | 2019-01-15 18:27:58 +0100 | [diff] [blame] | 278 | This option is useful if you want to push a change to your personal |
| 279 | branch first and for review to another branch for example. Or in cases |
| 280 | where a commit is already merged into a branch and you want to create |
| 281 | a new open change for that commit on another branch. |
| 282 | |
Changcheng Xiao | d089b4a | 2017-08-10 14:05:22 +0200 | [diff] [blame] | 283 | [[change-section]] |
| 284 | === Change section |
| 285 | |
| 286 | The change section includes configuration for project-specific change settings: |
| 287 | |
| 288 | [[change.privateByDefault]]change.privateByDefault:: |
| 289 | + |
| 290 | Controls whether all new changes in the project are set as private by default. |
| 291 | + |
| 292 | Note that a new change will be public if the `is_private` field in |
| 293 | link:rest-api-changes.html#change-input[ChangeInput] is set to `false` explicitly |
| 294 | when calling the link:rest-api-changes.html#create-change[CreateChange] REST API |
| 295 | or the `remove-private` link:user-upload.html#private[PushOption] is used during |
| 296 | the Git push. |
| 297 | + |
| 298 | Default is `INHERIT`, which means that this property is inherited from |
| 299 | the parent project. |
| 300 | |
David Ostrovsky | 9690994 | 2018-06-10 08:30:33 +0200 | [diff] [blame] | 301 | [[change.workInProgressByDefault]]change.workInProgressByDefault:: |
| 302 | + |
| 303 | Controls whether all new changes in the project are set as WIP by default. |
| 304 | + |
| 305 | Note that a new change will be ready if the `workInProgress` field in |
| 306 | link:rest-api-changes.html#change-input[ChangeInput] is set to `false` explicitly |
| 307 | when calling the link:rest-api-changes.html#create-change[CreateChange] REST API |
| 308 | or the `ready` link:user-upload.html#wip[PushOption] is used during |
| 309 | the Git push. |
| 310 | + |
| 311 | Default is `INHERIT`, which means that this property is inherited from |
| 312 | the parent project. |
| 313 | |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 314 | [[submit-section]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 315 | === Submit section |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 316 | |
| 317 | The submit section includes configuration of project-specific |
| 318 | submit settings: |
| 319 | |
David Pursehouse | c0c9289 | 2020-06-18 21:11:30 +0900 | [diff] [blame] | 320 | [[content_merge]]submit.mergeContent:: |
Sven Selberg | 03946a6 | 2020-06-18 08:26:48 +0200 | [diff] [blame] | 321 | + |
Edwin Kempin | 87f22e1 | 2022-08-02 14:48:52 +0200 | [diff] [blame] | 322 | Defines whether Gerrit will try to do a content merge when a path conflict |
| 323 | occurs while submitting a change. |
| 324 | + |
| 325 | A path conflict occurs when the same file has been changed on both sides of a |
| 326 | merge, e.g. when the same file has been touched in a change and concurrently in |
| 327 | the target branch. |
| 328 | + |
| 329 | Doing a content merge means that Gerrit attempts to merge the conflicting file |
| 330 | contents from both sides of the merge. This is successful if the touched lines |
| 331 | (plus some surrounding context lines) do not overlap (i.e. both sides touch |
| 332 | distinct lines). |
| 333 | + |
| 334 | NOTE: The content merge setting is not relevant when |
Edwin Kempin | 8be14b0 | 2022-08-02 16:55:29 +0200 | [diff] [blame] | 335 | link:#fast_forward_only[fast forward only] is configured as the |
Edwin Kempin | 87f22e1 | 2022-08-02 14:48:52 +0200 | [diff] [blame] | 336 | link:#submit.action[submit action] because in this case Gerrit will never |
| 337 | perform a merge, rebase or cherry-pick on submit. |
| 338 | + |
| 339 | If content merges are disabled, the submit button in the Gerrit web UI is |
| 340 | disabled, if any path conflict would occur on submitting the change. Users then |
| 341 | need to rebase the change manually to resolve the path conflict and then get |
| 342 | the change re-approved so that they can submit it. |
| 343 | + |
| 344 | NOTE: If only distinct lines have been touched on both sides, rebasing the |
| 345 | change from the Gerrit UI is sufficient to resolve the path conflict, since the |
| 346 | rebase action always does the rebase with content merge enabled. |
| 347 | + |
| 348 | The advantage of enabling content merges on submit is that it makes it less |
| 349 | likely that change submissions are rejected due to conflicts. Each change |
| 350 | submission that goes through with content merge, but would be rejected |
| 351 | otherwise, saves the user from needing to do extra work to get the change |
| 352 | submitted (rebase the change, get it re-approved and then submit it again). |
| 353 | + |
| 354 | On the other hand, disabling content merges decreases the chance of breaking |
| 355 | branches by submitting content merges of incompatible modifications in the same |
| 356 | file, e.g. a function is removed on one side and a new usage of that function |
| 357 | is added on the other side. Note, that the chance of breaking a branch by |
| 358 | incompatible modifications is only reduced, but not eliminated, e.g. even with |
| 359 | content merges disabled it's possible that a function is removed in one file |
| 360 | and a new usage of that function is added in another file. |
| 361 | + |
| 362 | The huge drawback of disabling content merge is that users need to do extra |
| 363 | work when a change isn't submittable due to a path conflict which could be |
| 364 | avoided if content merge was enabled (see above). In addition to this, it also |
| 365 | confuses and frustrates users if a change submission is rejected by Gerrit due |
| 366 | to a path conflict, but then when they rebase the change manually they do not |
| 367 | see any conflict (because manual rebases are always done with content merge |
| 368 | enabled). |
| 369 | + |
| 370 | In general, the stability gain of disabling content merges is not worth the |
| 371 | overhead and confusion that this adds for users, which is why disabling content |
| 372 | merges is highly discouraged. |
| 373 | + |
| 374 | Valid values are `true`, `false`, or `INHERIT`. |
| 375 | + |
| 376 | The default is `INHERIT`. |
| 377 | + |
| 378 | NOTE: Project owners can also set this option in the Gerrit UI: |
| 379 | `Browse` > `Repositories` > my/repository > `Allow content merges`. |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 380 | |
Sven Selberg | 03946a6 | 2020-06-18 08:26:48 +0200 | [diff] [blame] | 381 | [[submit.action]]submit.action:: |
| 382 | + |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 383 | Defines the submit action aka submit type aka submit strategy that Gerrit |
| 384 | should use to integrate changes into the target branch when they are submitted. |
| 385 | + |
| 386 | In general, submitting a change only merges the change if all its dependencies |
| 387 | are also submitted. The only exception is the `cherry pick` submit action which |
Edwin Kempin | d2278ae | 2022-07-27 17:27:44 +0200 | [diff] [blame] | 388 | ignores dependencies and hence is not recommended to be used (see |
| 389 | link:#cherry_pick[below]). |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 390 | + |
| 391 | [[submit-type]] |
| 392 | -- |
| 393 | The following submit actions are supported: |
| 394 | |
| 395 | [[merge_if_necessary]] |
| 396 | * 'merge if necessary': |
| 397 | + |
Edwin Kempin | 8be14b0 | 2022-08-02 16:55:29 +0200 | [diff] [blame] | 398 | With this action, when a change is being submitted, Gerrit fast-forwards the |
| 399 | target branch if possible, and otherwise creates a merge commit automatically. |
| 400 | + |
| 401 | A fast-forward is possible if the commit that represents the current patch set |
| 402 | of the change has the current head of the target branch in its parent lineage. |
| 403 | + |
| 404 | If a fast-forward is not possible, Gerrit automatically creates a merge commit |
| 405 | that merges the current patch set of the change into the target branch and then |
| 406 | the target branch is fast-forwarded to the merge commit. |
| 407 | + |
| 408 | The behavior of this submit action is identical with the classical `git merge` |
| 409 | behavior, or |
| 410 | link:https://git-scm.com/docs/git-merge#Documentation/git-merge.txt---ff[git |
| 411 | merge --ff]. |
| 412 | + |
| 413 | With this submit action the commits that have been reviewed and approved are |
| 414 | retained in the git history of the target branch. This means, by looking at the |
| 415 | history of the target branch, you can see for all commits when they were |
| 416 | originally committed and on which parent commit they were originally based. |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 417 | |
| 418 | [[always_merge]] |
| 419 | [[merge_always]] |
| 420 | * 'merge always': |
| 421 | + |
Edwin Kempin | 31db573 | 2022-08-03 15:21:08 +0200 | [diff] [blame] | 422 | With this action, when a change is being submitted, Gerrit always creates a |
| 423 | merge commit, even if a fast-forward is possible. |
| 424 | + |
| 425 | This is identical to the behavior of |
| 426 | link:https://git-scm.com/docs/git-merge#Documentation/git-merge.txt---no-ff[git merge --no-ff]. |
| 427 | + |
| 428 | With this submit action the commits that have been reviewed and approved are |
| 429 | retained in the git history of the target branch. This means, by looking at the |
| 430 | history of the target branch, you can see for all commits when they were |
| 431 | originally committed and on which parent commit they were originally based. In |
| 432 | addition, from the merge commits you can see when the changes were submitted |
| 433 | and it's possible to follow submissions with `git log --first-parent`. |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 434 | |
| 435 | [[rebase_if_necessary]] |
| 436 | * 'rebase if necessary': |
| 437 | + |
Edwin Kempin | 8be14b0 | 2022-08-02 16:55:29 +0200 | [diff] [blame] | 438 | With this action, when a change is being submitted, Gerrit fast-forwards the |
| 439 | target branch if possible, and otherwise does a rebase automatically. |
| 440 | + |
| 441 | A fast-forward is possible if the commit that represents the current patch set |
| 442 | of the change has the current head of the target branch in its parent lineage. |
| 443 | + |
| 444 | If a fast-forward is not possible, Gerrit automatically rebases the current |
| 445 | patch set of the change on top of the current head of the target branch and |
| 446 | then the target branch is fast-forwarded to the rebased commit. |
| 447 | + |
| 448 | With this submit action, when a rebase is performed, the original commits that |
| 449 | have been reviewed and approved do not become part of the target branch's |
| 450 | history. This means the information on when the original commits were committed |
| 451 | and on which parent they were based is not retained in the branch history. |
| 452 | + |
| 453 | Using this submit action results in a linear history of the target branch, |
| 454 | unless merge commits are being submitted. For some people this is an advantage |
| 455 | since they find the linear history easier to read. |
| 456 | + |
| 457 | NOTE: Rebasing merge commits is not supported. If a change with a merge commit |
| 458 | is submitted the link:#merge_if_necessary[merge if necessary] submit action is |
| 459 | applied. |
Edwin Kempin | c5721b4 | 2022-08-03 15:03:01 +0200 | [diff] [blame] | 460 | + |
| 461 | When rebasing the patchset, Gerrit automatically appends onto the end of the |
| 462 | commit message a short summary of the change's approvals, and a URL link back |
| 463 | to the change in the web UI (see link:#submit-footers[below]). If a fast-forward |
| 464 | is done no footers are added. |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 465 | |
| 466 | [[rebase_always]] |
| 467 | * 'rebase always': |
| 468 | + |
Edwin Kempin | 31db573 | 2022-08-03 15:21:08 +0200 | [diff] [blame] | 469 | With this action, when a change is being submitted, Gerrit always does a |
| 470 | rebase, even if a fast-forward is possible. |
| 471 | + |
| 472 | With this submit action, the original commits that have been reviewed and |
| 473 | approved do not become part of the target branch's history. This means the |
| 474 | information on when the original commits were committed and on which parent |
| 475 | they were based is not retained in the branch history. |
| 476 | + |
| 477 | Using this submit action results in a linear history of the target branch, |
| 478 | unless merge commits are being submitted. For some people this is an advantage |
| 479 | since they find the linear history easier to read. |
| 480 | + |
| 481 | NOTE: Rebasing merge commits is not supported. If a change with a merge commit |
| 482 | is submitted the link:#merge_if_necessary[merge if necessary] submit action is |
| 483 | applied. |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 484 | + |
Edwin Kempin | c5721b4 | 2022-08-03 15:03:01 +0200 | [diff] [blame] | 485 | When rebasing the patchset, Gerrit automatically appends onto the end of the |
| 486 | commit message a short summary of the change's approvals, and a URL link back |
| 487 | to the change in the web UI (see link:#submit-footers[below]). |
| 488 | + |
| 489 | The footers that are added are exactly the same footers that are also added by |
| 490 | the link:cherry_pick[cherry pick] action. Thus, the `rebase always` action can |
| 491 | be considered similar to the `cherry pick` action, but with the important |
| 492 | distinction that `rebase always` does not ignore dependencies, which is why |
| 493 | using the `rebase always` action should be preferred over the `cherry pick` |
| 494 | submit action. |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 495 | |
| 496 | [[fast_forward_only]] |
Edwin Kempin | 966626a | 2022-08-02 12:49:06 +0200 | [diff] [blame] | 497 | * 'fast forward only' (usage generally not recommended): |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 498 | + |
Edwin Kempin | 966626a | 2022-08-02 12:49:06 +0200 | [diff] [blame] | 499 | With this action a change can only be submitted if at submit time the target |
| 500 | branch can be fast-forwarded to the commit that represents the current patch |
| 501 | set of the change. This means in order for a change to be submittable its |
| 502 | current patch set must have the current head of the target branch in its parent |
| 503 | lineage. |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 504 | + |
Edwin Kempin | 966626a | 2022-08-02 12:49:06 +0200 | [diff] [blame] | 505 | The advantage of using this action is that the target branch is always updated |
| 506 | to the exact commit that has been reviewed and approved. In particular, if CI |
| 507 | verification is configured, this means that the CI verified the exact commit to |
| 508 | which the target branch is being fast-forwarded on submit (assuming no approval |
| 509 | copying is configured for CI votes). |
| 510 | + |
| 511 | The huge drawback of using this action is that whenever one change is submitted |
| 512 | all other open changes for the same branch, that are not successors of the |
| 513 | submitted change, become non-submittable, since the target branch can no longer |
| 514 | be fast-forwarded to their current patch sets. Making these changes submittable |
| 515 | again requires rebasing and re-approving/re-verifying them. For most projects |
| 516 | this causes an unreasonable amount of overhead that doesn't justify the |
| 517 | stability gain by verifying exact commits so that using this submit action is |
| 518 | generally discouraged. Using this action should only be considered for projects |
| 519 | that have a low frequency of changes and that have special requirements to |
| 520 | never break any target branch. |
| 521 | + |
| 522 | NOTE: With this submit action Gerrit does not create merge commits on |
| 523 | submitting a change, but merge commits that are created on the client, prior to |
| 524 | uploading to Gerrit for review, may still be submitted. |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 525 | |
| 526 | [[cherry_pick]] |
Edwin Kempin | d7eda15 | 2022-08-02 12:48:33 +0200 | [diff] [blame] | 527 | * 'cherry pick' (usage not recommended, use link:#rebase_always[rebase always] |
Edwin Kempin | d2278ae | 2022-07-27 17:27:44 +0200 | [diff] [blame] | 528 | instead): |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 529 | + |
Edwin Kempin | d2278ae | 2022-07-27 17:27:44 +0200 | [diff] [blame] | 530 | With this submit action Gerrit always performs a cherry pick of the current |
| 531 | patch set when a change is submitted. This ignores the parent lineage and |
| 532 | instead creates a brand new commit on top of the current head of the target |
| 533 | branch. The submitter becomes the committer of the new commit and the original |
| 534 | commit author is retained. |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 535 | + |
Edwin Kempin | d2278ae | 2022-07-27 17:27:44 +0200 | [diff] [blame] | 536 | Ignoring change dependencies on submit is often confusing for users. For users |
| 537 | that stack changes on top of each other, it's unexpected that these |
| 538 | dependencies are ignored on submit. Ignoring dependencies also means that |
| 539 | submitters need to submit the changes individually in the correct order. |
| 540 | Otherwise it's likely that submissions fail due to conflicts or that the |
| 541 | target branch gets broken (because it contains the submitted change, but not |
| 542 | its predecessors which may be required for the submitted change to work |
| 543 | correctly). |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 544 | + |
Edwin Kempin | d2278ae | 2022-07-27 17:27:44 +0200 | [diff] [blame] | 545 | If link:config-gerrit.html#change.submitWholeTopic[`change.submitWholeTopic`] |
| 546 | is enabled changes that have the same topic are submitted together, the same as |
| 547 | with all other submit actions. This means by setting the same topic on all |
| 548 | dependent changes it's possible to submit a stack of changes together and |
| 549 | overcome the limitation that change dependencies are ignored. |
| 550 | + |
| 551 | When cherry picking the patchset, Gerrit automatically appends onto the end of |
| 552 | the commit message a short summary of the change's approvals, and a URL link |
Edwin Kempin | c5721b4 | 2022-08-03 15:03:01 +0200 | [diff] [blame] | 553 | back to the change in the web UI (see link:#submit-footers[below]). |
Edwin Kempin | d2278ae | 2022-07-27 17:27:44 +0200 | [diff] [blame] | 554 | + |
| 555 | Using this submit action is not recommended because it ignores change |
| 556 | dependencies, instead link:#rebase_always[rebase always] should be used which |
| 557 | behaves the same way except that it respects change dependencies (in particular |
| 558 | `rebase always` adds the same kind of footers to the merged commit as |
| 559 | `cherry pick`). |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 560 | |
| 561 | -- |
| 562 | + |
| 563 | [[submit_type_inherit]] |
| 564 | In addition the submit action can be set to `Inherit`, which means that the |
| 565 | value that is configured in the parent project applies. For new projects |
| 566 | `Inherit` is the default, unless the default is overridden by the global |
| 567 | link:config-gerrit.html#repository.name.defaultSubmitType[defaultSubmitType] |
| 568 | configuration. Configuring `Inherit` for the `All-Projects` root project is |
| 569 | equivalent to configuring link:#merge_if_necessary[merge if necessary]. |
| 570 | + |
| 571 | If `submit.action` is not set, the default is 'merge if necessary'. |
| 572 | + |
Edwin Kempin | 95aff9e | 2022-08-03 15:41:42 +0200 | [diff] [blame] | 573 | NOTE: The different submit actions are also described in the |
| 574 | link:https://docs.google.com/presentation/d/1C73UgQdzZDw0gzpaEqIC6SPujZJhqamyqO1XOHjH-uk/edit#slide=id.g4d6c16487b_1_800[Gerrit - Concepts and Workflows] |
| 575 | presentation, where their behavior is visualized by git commit graphs. |
| 576 | + |
Edwin Kempin | 202fd4a | 2022-08-02 15:17:25 +0200 | [diff] [blame] | 577 | NOTE: If Gerrit performs a merge, rebase or cherry-pick as part of the |
| 578 | change submission (true for all submit actions, except for |
| 579 | link:#fast_forward_only[fast forward only]), it is controlled by the |
| 580 | link:#submit.mergeContent[mergeContent] setting whether a content merge is |
| 581 | performed when there is a path conflict. |
| 582 | + |
Edwin Kempin | d229dc3 | 2022-08-04 12:45:15 +0200 | [diff] [blame] | 583 | NOTE: If Gerrit performs a merge, rebase or cherry-pick as part of the |
| 584 | change submission (true for all submit actions, except for |
| 585 | link:#fast_forward_only[fast forward only]), it can be that trying to submit |
| 586 | a change would fail due to Git conflicts (if the same lines were modified |
| 587 | concurrently, or if link:#submit.mergeContent[mergeContent] is disabled also if |
| 588 | the same files were modified concurrently). In this case the submit button in |
| 589 | the Gerrit web UI is disabled and a tooltip on the disabled submit button |
| 590 | informs about the change being non-mergeable. |
| 591 | + |
Edwin Kempin | c5721b4 | 2022-08-03 15:03:01 +0200 | [diff] [blame] | 592 | [[submit-footers]] |
| 593 | -- |
| 594 | NOTE: If Gerrit performs a rebase or cherry-pick as part of the change |
| 595 | submission (true for link:#rebase_if_necessary[rebase if necessary], |
| 596 | link:#rebase_always[rebase always] and link:#cherry_pick[cherry pick]) Gerrit |
| 597 | inserts additional footers into the commit message of the newly created |
| 598 | commit: + |
| 599 | + |
| 600 | * `Change-Id: <change-id>` (only if this footer is not already present, see |
| 601 | link:user-changeid.html[Change-Id]) + |
| 602 | * `Reviewed-on: <change-url>` (links to the change in Gerrit where this commit |
| 603 | was reviewed) + |
| 604 | * `Reviewed-by: <reviewer>` (once for every reviewer with a positive |
| 605 | `Code-Review` vote) + |
| 606 | * `Tested-by: <reviewer>` (once for every reviewer with a positive `Verified` |
| 607 | vote) + |
| 608 | * `<label-name>: <reviewer>` (once for every reviewer with a positive vote on |
| 609 | any other label) + |
Edwin Kempin | 318c322 | 2022-08-03 15:32:38 +0200 | [diff] [blame] | 610 | + |
| 611 | In addition, plugins that implement a |
| 612 | link:dev-plugins.html#change-message-modifier[Change Message Modifier] may add |
| 613 | additional custom footers. |
Edwin Kempin | c5721b4 | 2022-08-03 15:03:01 +0200 | [diff] [blame] | 614 | -- |
| 615 | + |
Edwin Kempin | d736da3 | 2022-07-27 12:41:05 +0200 | [diff] [blame] | 616 | NOTE: For the value of `submit.action` in `project.config` use the exact |
| 617 | spelling as given above, e.g. 'merge if necessary' (without the single quotes, |
| 618 | but with the spaces). |
| 619 | + |
| 620 | NOTE: Project owners can also set the submit action in the Gerrit UI: |
| 621 | `Browse` > `Repositories` > my/repository > `Submit type` |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 622 | |
Sven Selberg | 03946a6 | 2020-06-18 08:26:48 +0200 | [diff] [blame] | 623 | [[submit.matchAuthorToCommitterDate]]submit.matchAuthorToCommitterDate:: |
| 624 | + |
| 625 | Defines whether the author date will be changed to match the submitter date upon submit, so that |
| 626 | git log shows when the change was submitted instead of when the author last committed. Valid |
| 627 | values are 'true', 'false', or 'INHERIT'. The default is 'INHERIT'. This option only takes effect |
| 628 | in submit strategies which already modify the commit, i.e. Cherry Pick, Rebase Always, and |
| 629 | (when rebase is necessary) Rebase If Necessary. |
Patrick Hiesel | 5a31635 | 2017-06-22 15:38:06 +0200 | [diff] [blame] | 630 | |
Sven Selberg | 03946a6 | 2020-06-18 08:26:48 +0200 | [diff] [blame] | 631 | [[submit.rejectEmptyCommit]]submit.rejectEmptyCommit:: |
| 632 | + |
| 633 | Defines whether empty commits should be rejected when a change is merged. When using |
| 634 | link:#submit.action[submit action] Cherry Pick, Rebase If Necessary or Rebase Always changes may |
| 635 | become empty upon submit, since the rebase|cherry-pick can lead to an empty commit. If this option |
| 636 | is set to 'true' the merge would fail in such a case. An empty commit is still allowed as the |
| 637 | initial commit on a branch. |
Patrick Hiesel | dc285c7 | 2018-01-08 17:20:15 +0100 | [diff] [blame] | 638 | |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 639 | |
| 640 | [[access-section]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 641 | === Access section |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 642 | |
| 643 | Each +access+ section includes a reference and access rights connected |
| 644 | to groups. Each group listed must exist in the link:#file-groups[+groups+ file]. |
| 645 | |
| 646 | Please refer to the |
| 647 | link:access-control.html#access_categories[Access Categories] |
| 648 | documentation for a full list of available access rights. |
| 649 | |
| 650 | |
Shawn Pearce | 9cfcebd | 2014-04-25 16:41:12 -0700 | [diff] [blame] | 651 | [[mimetype-section]] |
| 652 | === MIME Types section |
| 653 | |
| 654 | The +mimetype+ section may be configured to force the web code |
| 655 | reviewer to return certain MIME types by file path. MIME types |
| 656 | may be used to activate syntax highlighting. |
| 657 | |
| 658 | ---- |
| 659 | [mimetype "text/x-c"] |
| 660 | path = *.pkt |
| 661 | [mimetype "text/x-java"] |
| 662 | path = api/current.txt |
| 663 | ---- |
| 664 | |
| 665 | |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 666 | [[capability-section]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 667 | === Capability section |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 668 | |
| 669 | The +capability+ section only appears once, and only in the +All-Projects+ |
| 670 | repository. It controls Gerrit administration capabilities that are configured |
| 671 | on a global level. |
| 672 | |
| 673 | Please refer to the |
| 674 | link:access-control.html#global_capabilities[Global Capabilities] |
| 675 | documentation for a full list of available capabilities. |
| 676 | |
David Myllykangas | b3ccec6 | 2015-01-21 15:41:13 +0100 | [diff] [blame] | 677 | [[label-section]] |
| 678 | === Label section |
| 679 | |
| 680 | Please refer to link:config-labels.html#label_custom[Custom Labels] documentation. |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 681 | |
Youssef Elghareeb | 78287a4 | 2021-12-06 17:04:23 +0100 | [diff] [blame] | 682 | [[submit-requirement-section]] |
| 683 | === Submit Requirement section |
| 684 | |
| 685 | Please refer to link:config-submit-requirements.html[Configuring Submit |
| 686 | Requirements] documentation. |
| 687 | |
Saša Živkov | 944b838 | 2014-05-08 14:02:15 +0200 | [diff] [blame] | 688 | [[branchOrder-section]] |
| 689 | === branchOrder section |
| 690 | |
| 691 | Defines a branch ordering which is used for backporting of changes. |
| 692 | Backporting will be offered for a change (in the Gerrit UI) for all |
| 693 | more stable branches where the change can merge cleanly. |
| 694 | |
| 695 | [[branchOrder.branch]]branchOrder.branch:: |
| 696 | + |
| 697 | A branch name, typically multiple values will be defined. The order of branch |
| 698 | names in this section defines the branch order. The topmost is considered to be |
| 699 | the least stable branch (typically the master branch) and the last one the |
| 700 | most stable (typically the last maintained release branch). |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 701 | + |
Saša Živkov | 944b838 | 2014-05-08 14:02:15 +0200 | [diff] [blame] | 702 | Example: |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 703 | + |
Saša Živkov | 944b838 | 2014-05-08 14:02:15 +0200 | [diff] [blame] | 704 | ---- |
| 705 | [branchOrder] |
| 706 | branch = master |
| 707 | branch = stable-2.9 |
| 708 | branch = stable-2.8 |
| 709 | branch = stable-2.7 |
| 710 | ---- |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 711 | + |
Saša Živkov | 944b838 | 2014-05-08 14:02:15 +0200 | [diff] [blame] | 712 | The `branchOrder` section is inheritable. This is useful when multiple or all |
| 713 | projects follow the same branch rules. A `branchOrder` section in a child |
| 714 | project completely overrides any `branchOrder` section from a parent i.e. there |
| 715 | is no merging of `branchOrder` sections. A present but empty `branchOrder` |
| 716 | section removes all inherited branch order. |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 717 | + |
Saša Živkov | 944b838 | 2014-05-08 14:02:15 +0200 | [diff] [blame] | 718 | Branches not listed in this section will not be included in the mergeability |
| 719 | check. If the `branchOrder` section is not defined then the mergeability of a |
| 720 | change into other branches will not be done. |
| 721 | |
Patrick Hiesel | 6db5afd | 2017-03-21 09:40:03 +0100 | [diff] [blame] | 722 | [[reviewer-section]] |
| 723 | === reviewer section |
| 724 | |
| 725 | Defines config options to adjust a project's reviewer workflow such as enabling |
| 726 | reviewers and CCs by email. |
| 727 | |
| 728 | [[reviewer.enableByEmail]]reviewer.enableByEmail:: |
| 729 | + |
| 730 | A boolean indicating if reviewers and CCs that do not currently have a Gerrit |
| 731 | account can be added to a change by providing their email address. |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 732 | + |
Edwin Kempin | e441f97 | 2022-02-08 15:22:08 +0100 | [diff] [blame] | 733 | This setting only takes effect for changes that are readable by anonymous users. |
Edwin Kempin | 677e7e6 | 2021-06-15 09:28:48 +0200 | [diff] [blame] | 734 | + |
Patrick Hiesel | 502b26c | 2017-03-29 14:19:23 +0200 | [diff] [blame] | 735 | Default is `INHERIT`, which means that this property is inherited from |
| 736 | the parent project. If the property is not set in any parent project, the |
| 737 | default value is `FALSE`. |
Saša Živkov | 944b838 | 2014-05-08 14:02:15 +0200 | [diff] [blame] | 738 | |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 739 | [[file-groups]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 740 | == The file +groups+ |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 741 | |
| 742 | Each group in this list is linked with its UUID so that renaming of |
| 743 | groups is possible without having to rewrite every +groups+ file |
| 744 | in every repository where it's used. |
| 745 | |
| 746 | This is what the default groups file for +All-Projects.git+ looks like: |
| 747 | |
| 748 | ---- |
| 749 | # UUID Group Name |
| 750 | # |
| 751 | 3d6da7dc4e99e6f6e5b5196e21b6f504fc530bba Administrators |
| 752 | global:Anonymous-Users Anonymous Users |
Khai Do | 5aaeee3 | 2014-09-05 10:14:32 -0700 | [diff] [blame] | 753 | global:Change-Owner Change Owner |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 754 | global:Project-Owners Project Owners |
| 755 | global:Registered-Users Registered Users |
| 756 | ---- |
| 757 | |
| 758 | This file can't be written to by the +git config+ command. |
| 759 | |
| 760 | In order to reference a group in +project.config+, it must be listed in |
| 761 | the +groups+ file. When editing permissions through the web UI this |
| 762 | file is maintained automatically, but when pushing updates to |
| 763 | +refs/meta/config+ this must be dealt with by hand. Gerrit will refuse |
| 764 | +project.config+ files that refer to groups not listed in +groups+. |
| 765 | |
| 766 | The UUID of a group can be found on the General tab of the group's page |
| 767 | in the web UI or via the +-v+ option to |
| 768 | link:cmd-ls-groups.html[the +ls-groups+ SSH command]. |
| 769 | |
| 770 | |
| 771 | [[file-rules_pl]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 772 | == The file +rules.pl+ |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 773 | |
| 774 | The +rules.pl+ files allows you to replace or amend the default Prolog |
| 775 | rules that control e.g. what conditions need to be fulfilled for a |
| 776 | change to be submittable. This file content should be |
| 777 | interpretable by the 'Prolog Cafe' interpreter. |
| 778 | |
| 779 | You can read more about the +rules.pl+ file and the prolog rules on |
| 780 | link:prolog-cookbook.html[the Prolog cookbook page]. |
| 781 | |
David Pursehouse | e200d0d | 2019-06-05 12:08:19 +0900 | [diff] [blame] | 782 | GERRIT |
| 783 | ------ |
| 784 | Part of link:index.html[Gerrit Code Review] |
| 785 | |
| 786 | SEARCHBOX |
| 787 | --------- |