OSDN Git Service

Improved large commit handling.
authorBoyan Tabakov <boyan.tabakov@futurice.com>
Wed, 4 Sep 2013 07:33:09 +0000 (10:33 +0300)
committerBoyan Tabakov <boyan.tabakov@futurice.com>
Sat, 7 Sep 2013 11:44:03 +0000 (14:44 +0300)
commit01ff084a4df76ba0856a513aca9bdf8f1d550365
treed90ef89169f4e53dc702172b3f3b01a030619549
parent71d31a38fc73252a76076820c63d054a8047d667
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.
app/assets/javascripts/merge_requests.js.coffee
app/contexts/commit_load_context.rb
app/controllers/projects/commit_controller.rb
app/controllers/projects/compare_controller.rb
app/controllers/projects/merge_requests_controller.rb
app/models/commit.rb
app/views/projects/commits/_diffs.html.haml
features/project/commits/commits.feature
features/steps/project/project_browse_commits.rb
features/support/env.rb
spec/support/big_commits.rb [new file with mode: 0644]