summaryrefslogtreecommitdiff
path: root/app/views/notify/repository_push_email.html.haml
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-06-20 18:54:53 +0200
committerDouwe Maan <douwe@selenight.nl>2016-07-06 18:50:58 -0400
commit9fc0e11e0dbd541c8c0bca60878178ca94ad34e1 (patch)
tree4ecdb99f6c0247ec8d51eaa1d85aba470a3c890b /app/views/notify/repository_push_email.html.haml
parent17ab745e40bf89776ab16de9ba00ebb44d1c85ca (diff)
downloadgitlab-ce-9fc0e11e0dbd541c8c0bca60878178ca94ad34e1.tar.gz
Add DiffFile#blob and #old_blob
Diffstat (limited to 'app/views/notify/repository_push_email.html.haml')
-rw-r--r--app/views/notify/repository_push_email.html.haml5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/views/notify/repository_push_email.html.haml b/app/views/notify/repository_push_email.html.haml
index f1532371b2e..c161ecc3463 100644
--- a/app/views/notify/repository_push_email.html.haml
+++ b/app/views/notify/repository_push_email.html.haml
@@ -72,12 +72,11 @@
The diff for this file was not included because it is too large.
- else
%hr
- - diff_commit = diff_file.deleted_file ? @message.diff_refs.first : @message.diff_refs.last
- - blob = @message.project.repository.blob_for_diff(diff_commit, diff_file)
+ - blob = diff_file.blob
- if blob && blob.respond_to?(:text?) && blob_text_viewable?(blob)
%table.code.white
- diff_file.highlighted_diff_lines.each do |line|
- = render "projects/diffs/line", {line: line, diff_file: diff_file, line_code: nil, plain: true}
+ = render "projects/diffs/line", line: line, diff_file: diff_file, plain: true
- else
No preview for this file type
%br