diff options
author | Boyan Tabakov <boyan.tabakov@futurice.com> | 2013-09-04 10:33:09 +0300 |
---|---|---|
committer | Boyan Tabakov <boyan.tabakov@futurice.com> | 2013-09-07 14:44:03 +0300 |
commit | 01ff084a4df76ba0856a513aca9bdf8f1d550365 (patch) | |
tree | d90ef89169f4e53dc702172b3f3b01a030619549 /app/controllers/projects/commit_controller.rb | |
parent | 71d31a38fc73252a76076820c63d054a8047d667 (diff) | |
download | gitlab-ce-01ff084a4df76ba0856a513aca9bdf8f1d550365.tar.gz |
Improved large commit handling.
Previously, only number of changed files mattered. Now, number of lines to render in the diff are also taken into account.
A hard limit is set, above which diffs are not rendered and users are not allowed to override that. This prevents high server
resource usage with huge commits.
Related to #1745, #2259
In addition, handle large commits for MergeRequests and Compare controllers.
Also fixes a bug where diffs are loaded twice, if user goes directly to merge_requests/:id/diffs URL.
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 6a2d2315c1d..bdc501d73bb 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -18,6 +18,7 @@ class Projects::CommitController < Projects::ApplicationController end @suppress_diff = result[:suppress_diff] + @force_suppress_diff = result[:force_suppress_diff] @note = result[:note] @line_notes = result[:line_notes] |