From 6d0dcb6614fc0743d50ffe68bf61c2c50728c1d6 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 25 Oct 2012 12:16:14 +0300 Subject: Reduce max commit diff size. Added Commit::DIFF_SAFE_SIZE --- app/models/commit.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/models/commit.rb') diff --git a/app/models/commit.rb b/app/models/commit.rb index a070e830680..e6a87dd9217 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -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, -- cgit v1.2.1