Handle app crash on huge commits

This commit is contained in:
randx 2012-08-11 15:59:36 +03:00
parent ac525a74ee
commit 731b6be9c9
2 changed files with 12 additions and 4 deletions

View file

@ -41,8 +41,9 @@ class CommitsController < ApplicationController
return git_not_found!
end
rescue Grit::Git::GitTimeout
render "huge_commit"
if result[:status] == :huge_commit
render "huge_commit" and return
end
end
def compare