From 679d0d6d760b850e27c13f3ce0f812b8b081df7f Mon Sep 17 00:00:00 2001 From: randx Date: Tue, 9 Oct 2012 22:09:46 +0300 Subject: Context refactoring. Move Issues list, Search logic to context --- app/contexts/commit_load.rb | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 app/contexts/commit_load.rb (limited to 'app/contexts/commit_load.rb') diff --git a/app/contexts/commit_load.rb b/app/contexts/commit_load.rb deleted file mode 100644 index 81fb4925cc8..00000000000 --- a/app/contexts/commit_load.rb +++ /dev/null @@ -1,33 +0,0 @@ -class CommitLoad < BaseContext - def execute - result = { - commit: nil, - suppress_diff: false, - line_notes: [], - notes_count: 0, - note: nil, - status: :ok - } - - commit = project.commit(params[:id]) - - if commit - commit = CommitDecorator.decorate(commit) - line_notes = project.commit_line_notes(commit) - - result[:commit] = commit - result[:note] = project.build_commit_note(commit) - result[:line_notes] = line_notes - result[:notes_count] = line_notes.count + project.commit_notes(commit).count - - begin - result[:suppress_diff] = true if commit.diffs.size > 200 && !params[:force_show_diff] - rescue Grit::Git::GitTimeout - result[:suppress_diff] = true - result[:status] = :huge_commit - end - end - - result - end -end -- cgit v1.2.1