Reduce max commit diff size. Added Commit::DIFF_SAFE_SIZE

This commit is contained in:
Dmitriy Zaporozhets 2012-10-25 12:16:14 +03:00
parent 1ea0dd0ffc
commit 6d0dcb6614
4 changed files with 11 additions and 5 deletions

View file

@ -4,6 +4,11 @@ class Commit
include StaticModel
extend ActiveModel::Naming
# Safe amount of files with diffs in one commit to render
# Used to prevent 500 error on huge commits by suppressing diff
#
DIFF_SAFE_SIZE = 100
attr_accessor :commit, :head, :refs
delegate :message, :authored_date, :committed_date, :parents, :sha,