Merge changes Ife0cb7fb,Id1a0a442,Idaafa178,I204ed759
* changes:
Document that being a code owner doesn't grant the user permissions to approve
ChangedFiles: Correct comment about initial commits
Document that per-file lines should not contain additional spaces
Document why non-resolvable emails are reject with a generic message
diff --git a/java/com/google/gerrit/plugins/codeowners/backend/ChangedFiles.java b/java/com/google/gerrit/plugins/codeowners/backend/ChangedFiles.java
index 27412f2..1d98268 100644
--- a/java/com/google/gerrit/plugins/codeowners/backend/ChangedFiles.java
+++ b/java/com/google/gerrit/plugins/codeowners/backend/ChangedFiles.java
@@ -93,8 +93,8 @@
if (mergeCommitStrategy.equals(MergeCommitStrategy.FILES_WITH_CONFLICT_RESOLUTION)
|| isInitialCommit(project, revision)) {
// Use parentNum=0 to do the comparison against the default base.
- // For non-merge commits the default base is the only parent (aka parent 1, initial commits
- // are not supported).
+ // For non-merge commits the default base is the only parent (aka parent 1).
+ // Initial commits are supported when using parentNum=0.
// For merge commits the default base is the auto-merge commit which should be used as base
// if the merge commit strategy is FILES_WITH_CONFLICT_RESOLUTION.
fileDiffOutputs =
diff --git a/resources/Documentation/backend-find-owners.md b/resources/Documentation/backend-find-owners.md
index 9d2fab5..223cebb 100644
--- a/resources/Documentation/backend-find-owners.md
+++ b/resources/Documentation/backend-find-owners.md
@@ -266,6 +266,13 @@
per-file docs.config,*.md=richard.roe@example.com
```
+**NOTE:** It's important to not include additional spaces in `per-file` lines.
+E.g. "per-file docs.config, test.config=richard.roe@example.com" will make
+Richard Roe a code owner of the files "docs.config" and " test.config" (pay
+attention to the leading space), but not for the file "test.config". The correct
+line to make Richard Roe a code owner of the files "docs.config" and
+"test.config" would be "per-file docs.config,test.config=richard.roe@example.com".
+
##### <a id="doNotUsePathExpressionsForSubdirectories">
**NOTE:** It is discouraged to use path expressions that explicitly name
subdirectories such as `my-subdir/*` as they will break when the subdirectory
diff --git a/resources/Documentation/user-guide.md b/resources/Documentation/user-guide.md
index 37049fc..a176398 100644
--- a/resources/Documentation/user-guide.md
+++ b/resources/Documentation/user-guide.md
@@ -24,6 +24,12 @@
Who is a code owner of a path is controlled via [code owner config
files](#codeOwnerConfigFiles) (e.g. `OWNERS` files).
+**NOTE:** Being a code owner doesn't grant the user permissions to approve
+changes, but permissions to vote on the label that is required as a
+[code owner approval](#codeOwnerApproval) must be configured separately. This
+means it's possible that a user is a code owner, but misses permissions to apply
+code owner approvals.
+
## <a id="whyCodeOwners">Why should code owners be used?
Code owners are gatekeepers before a change is submitted, they enforce standards
diff --git a/resources/Documentation/validation.md b/resources/Documentation/validation.md
index 60ee4d2..3f2d639 100644
--- a/resources/Documentation/validation.md
+++ b/resources/Documentation/validation.md
@@ -182,6 +182,13 @@
* the project from which the file should be imported doesn't permit reads
(e.g. has the state `HIDDEN`)
+**NOTE:** Non-resolvable code owner emails are rejected with a generic message,
+rather than informing about the exact reason why a code owner email is not
+resolvable. This is intentional and prevents that uploaders can probe the
+existence of emails/accounts (if specific reasons would be returned an uploader
+could create a code owner config file with arbitrary emails and then deduce from
+the messages which emails/accounts exist, which would a privacy issue).
+
**NOTE:** Whether commits that newly add non-resolvable code owners and
non-resolvable imports are rejected on commit received and on submit is
controlled by the