diff options
author | Robert Speicher <robert@gitlab.com> | 2016-06-20 13:26:16 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-06-20 13:26:16 +0000 |
commit | 160499b525de8374da8a24a2e74e74c51e0f7452 (patch) | |
tree | 5b6a8b28287fa6a7356b5b53a0e104861c3ec0e3 /lib | |
parent | ced3db8a0ff9fcd6770886316138efd27e7efe05 (diff) | |
parent | 1022a1678b2b08fd226a5c88e4c472b8426de1c4 (diff) | |
download | gitlab-ce-160499b525de8374da8a24a2e74e74c51e0f7452.tar.gz |
Merge branch 'limit-email-diff-size' into 'master'
Limit push email diff size
Restrict the size of diffs in push emails to 30 lines / 150 KB (whichever is smaller),
following https://gitlab.com/gitlab-org/gitlab_git/merge_requests/85.
Emails on push can get very large if they contain a lot of files that sneak under the single-file limit.
https://gitlab.com/gitlab-org/gitlab-ee/issues/490
See merge request !4566
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/email/message/repository_push.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/email/message/repository_push.rb b/lib/gitlab/email/message/repository_push.rb index e2fee6b9f3e..047c77c6fc2 100644 --- a/lib/gitlab/email/message/repository_push.rb +++ b/lib/gitlab/email/message/repository_push.rb @@ -37,7 +37,7 @@ module Gitlab end def diffs - @diffs ||= (safe_diff_files(compare.diffs, diff_refs) if compare) + @diffs ||= (safe_diff_files(compare.diffs(max_files: 30), diff_refs) if compare) end def diffs_count |