Skip to content

Commit

Permalink
Merge branch 'stanhu/gitlab-ce-fix-mr-creation-with-large-diffs'
Browse files Browse the repository at this point in the history
  • Loading branch information
dzaporozhets committed Sep 25, 2015
2 parents f68acba + a44ca15 commit b623391
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.

v 8.1.0 (unreleased)
- Fix bug where projects would appear to be stuck in the forked import state (Stan Hu)
- Fix Error 500 in creating merge requests with > 1000 diffs (Stan Hu)
- Show CI status on all pages where commits list is rendered
- Automatically enable CI when push .gitlab-ci.yml file to repository
- Move CI charts to project graphs area
Expand Down
4 changes: 2 additions & 2 deletions app/models/merge_request_diff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ def reload_diffs
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

Expand Down

0 comments on commit b623391

Please sign in to comment.