Add merge validation interface
Add a new MergeValidationListener interface which can be used to
provide additional validation of commits before they are merged to
the git repository.
Add a MergeValidators class to invoke the merge validator listeners,
and call it from MergeOp before the commit is merged.
Add a listener to invoke validation provided by plugins.
Change-Id: I325d923f5cc0245b60e86a035329b640c1682d48
diff --git a/Documentation/config-validation.txt b/Documentation/config-validation.txt
index fd8c0bd..1b09d19 100644
--- a/Documentation/config-validation.txt
+++ b/Documentation/config-validation.txt
@@ -4,6 +4,11 @@
Gerrit supports link:dev-plugins.html[plugin-based] validation of
commits.
+[[new-commit-validation]]
+New commit validation
+---------------------
+
+
Plugins implementing the `CommitValidationListener` interface can
perform additional validation checks against new commits.
@@ -18,6 +23,18 @@
Out of the box, Gerrit includes a plugin that checks the length of the
subject and body lines of commit messages on uploaded commits.
+[[pre-merge-validation]]
+Pre-merge validation
+--------------------
+
+
+Plugins implementing the `MergeValidationListener` interface can
+perform additional validation checks against commits before they
+are merged to the git repository.
+
+If the commit fails the validation, the plugin can throw an exception
+which will cause the merge to fail.
+
GERRIT
------