summaryrefslogtreecommitdiff
path: root/app/contexts
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-15 15:06:12 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-15 15:06:12 +0200
commitf19cdee8cc1e85066154d008ee2653d845c9f3cd (patch)
tree3a9845a6e961903632475a4e3384d425d4e4fe88 /app/contexts
parent8bfc62fb8b02bde7da97958deb8aeda63581bfce (diff)
downloadgitlab-ce-f19cdee8cc1e85066154d008ee2653d845c9f3cd.tar.gz
Remove commit_load_context.rb
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/contexts')
-rw-r--r--app/contexts/commit_load_context.rb34
1 files changed, 0 insertions, 34 deletions
diff --git a/app/contexts/commit_load_context.rb b/app/contexts/commit_load_context.rb
deleted file mode 100644
index 0c684976b64..00000000000
--- a/app/contexts/commit_load_context.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-class CommitLoadContext < BaseContext
- def execute
- result = {
- commit: nil,
- suppress_diff: false,
- line_notes: [],
- notes_count: 0,
- note: nil,
- status: :ok
- }
-
- commit = project.repository.commit(params[:id])
-
- if commit
- line_notes = project.notes.for_commit_id(commit.id).inline
-
- result[:commit] = commit
- result[:note] = project.build_commit_note(commit)
- result[:line_notes] = line_notes
- result[:notes_count] = project.notes.for_commit_id(commit.id).count
- result[:branches] = project.repository.branch_names_contains(commit.id)
-
- begin
- result[:suppress_diff] = true if commit.diff_suppress? && !params[:force_show_diff]
- result[:force_suppress_diff] = commit.diff_force_suppress?
- rescue Grit::Git::GitTimeout
- result[:suppress_diff] = true
- result[:status] = :huge_commit
- end
- end
-
- result
- end
-end