Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-06-20 16:26:16 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-06-20 17:14:20 +0300
commitf279ce631d40498c0fd3653f759ba7fbdfc58b81 (patch)
tree86c11253b166b7270db46381edcaaa44a5ade248 /lib
parent8a5659927da601e8f7ff0dbd1257b1023fede94c (diff)
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.rb2
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