summaryrefslogtreecommitdiff
path: root/app/contexts/commit_load.rb
diff options
context:
space:
mode:
authorrandx <dmitriy.zaporozhets@gmail.com>2012-10-09 22:09:46 +0300
committerrandx <dmitriy.zaporozhets@gmail.com>2012-10-09 22:09:46 +0300
commit679d0d6d760b850e27c13f3ce0f812b8b081df7f (patch)
treee3f088a9139d693e96fd2bd86264150f0d96270c /app/contexts/commit_load.rb
parent63fe042d97a5430770ec50fc0e8f29c416bd2ec9 (diff)
downloadgitlab-ce-679d0d6d760b850e27c13f3ce0f812b8b081df7f.tar.gz
Context refactoring. Move Issues list, Search logic to context
Diffstat (limited to 'app/contexts/commit_load.rb')
-rw-r--r--app/contexts/commit_load.rb33
1 files changed, 0 insertions, 33 deletions
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