summaryrefslogtreecommitdiff
path: root/app/controllers/projects/commit_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r--app/controllers/projects/commit_controller.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index 860ab408299..c344297ba8a 100644
--- a/app/controllers/projects/commit_controller.rb
+++ b/app/controllers/projects/commit_controller.rb
@@ -20,11 +20,10 @@ class Projects::CommitController < Projects::ApplicationController
end
begin
- @suppress_diff = true if commit.diff_suppress? && !params[:force_show_diff]
- @force_suppress_diff = commit.diff_force_suppress?
+ @diffs = @commit.diffs
rescue Grit::Git::GitTimeout
- @suppress_diff = true
- @status = :huge_commit
+ @diffs = []
+ @diff_timeout = true
end
@note = project.build_commit_note(commit)
@@ -38,12 +37,7 @@ class Projects::CommitController < Projects::ApplicationController
}
respond_to do |format|
- format.html do
- if @status == :huge_commit
- render "huge_commit" and return
- end
- end
-
+ format.html
format.diff { render text: @commit.to_diff }
format.patch { render text: @commit.to_patch }
end