Limit max number of changes pushed in a batch.
'receive.maxBatchChanges' is the maximum number of changes that Gerrit allows to be pushed in a batch for review. When it is exceeded Gerrit rejects the push with an error message. This setting can be used to prevent users from uploading large number of changes by mistake, e.g. when pushing deliveries from external git repositories. Default is zero, no limit. Change-Id: Ib9821190d3c88ac9a2efbb552e21c257165a9443
This commit is contained in:
@@ -25,6 +25,7 @@ class ReceiveConfig {
|
||||
final boolean checkMagicRefs;
|
||||
final boolean checkReferencedObjectsAreReachable;
|
||||
final boolean allowDrafts;
|
||||
final int maxBatchChanges;
|
||||
|
||||
@Inject
|
||||
ReceiveConfig(@GerritServerConfig Config config) {
|
||||
@@ -37,5 +38,6 @@ class ReceiveConfig {
|
||||
allowDrafts = config.getBoolean(
|
||||
"change", null, "allowDrafts",
|
||||
true);
|
||||
maxBatchChanges = config.getInt("receive", "maxBatchChanges", 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user