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
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-25 15:08:30 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-25 15:08:30 +0300
commitb623391720e2687ca88c6bf1166ee571d85807fa (patch)
treec673652cabecd0a46ad2329d4b0dab88ba740ac3 /app/models
parentf68acbacd9f7635abc3c4f8f4b3ebd1c011c76e3 (diff)
parenta44ca15c1dd71381d6b11638003f60253c2d8964 (diff)
Merge branch 'stanhu/gitlab-ce-fix-mr-creation-with-large-diffs'
Diffstat (limited to 'app/models')
-rw-r--r--app/models/merge_request_diff.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb
index e317c8eac4d..f75f999b0d0 100644
--- a/app/models/merge_request_diff.rb
+++ b/app/models/merge_request_diff.rb
@@ -123,12 +123,12 @@ class MergeRequestDiff < ActiveRecord::Base
if new_diffs.any?
if new_diffs.size > Commit::DIFF_HARD_LIMIT_FILES
self.state = :overflow_diff_files_limit
- new_diffs = new_diffs.first[Commit::DIFF_HARD_LIMIT_LINES]
+ new_diffs = new_diffs.first(Commit::DIFF_HARD_LIMIT_LINES)
end
if new_diffs.sum { |diff| diff.diff.lines.count } > Commit::DIFF_HARD_LIMIT_LINES
self.state = :overflow_diff_lines_limit
- new_diffs = new_diffs.first[Commit::DIFF_HARD_LIMIT_LINES]
+ new_diffs = new_diffs.first(Commit::DIFF_HARD_LIMIT_LINES)
end
end