sendemail.maximumDiffSize: Limit the size of diffs sent by email
If a unified diff included in an email will exceed the limit configured by the system administrator, only the affected file paths are listed in the email instead. This gives interested parties some context on the size and scope of the change, without killing their inbox. Change-Id: I93c6068e9fd04095b6ad353b736126b29c4ed4fc
This commit is contained in:
@@ -23,9 +23,11 @@ import org.eclipse.jgit.lib.Config;
|
||||
@Singleton
|
||||
class EmailSettings {
|
||||
final boolean includeDiff;
|
||||
final int maximumDiffSize;
|
||||
|
||||
@Inject
|
||||
EmailSettings(@GerritServerConfig Config cfg) {
|
||||
includeDiff = cfg.getBoolean("sendemail", "includeDiff", false);
|
||||
maximumDiffSize = cfg.getInt("sendemail", "maximumDiffSize", 256 << 10);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user