summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-25 15:17:57 -0500
committerDouwe Maan <douwe@selenight.nl>2017-05-25 15:17:57 -0500
commitd88a5c1db1c6cca639039188a26c6e6d5bc68831 (patch)
tree9c16df7ff7c58dadf30eae83246d8cc5ba42358f
parent68f7fd8b7840fc6b4160db51382fd09e673d2501 (diff)
downloadgitlab-ce-d88a5c1db1c6cca639039188a26c6e6d5bc68831.tar.gz
Address feedback
-rw-r--r--app/views/notify/repository_push_email.html.haml6
-rw-r--r--lib/gitlab/diff/file_collection/base.rb2
2 files changed, 3 insertions, 5 deletions
diff --git a/app/views/notify/repository_push_email.html.haml b/app/views/notify/repository_push_email.html.haml
index e9e68b62771..546376aeed8 100644
--- a/app/views/notify/repository_push_email.html.haml
+++ b/app/views/notify/repository_push_email.html.haml
@@ -26,10 +26,8 @@
%h4 #{pluralize @message.diffs_count, "changed file"}:
- - diff_files = @message.diffs
-
%ul
- - diff_files.each do |diff_file|
+ - @message.diffs.each do |diff_file|
%li.file-stats
%a{ href: "#{@message.target_url if @message.disable_diffs?}##{hexdigest(diff_file.file_path)}" }
- if diff_file.deleted_file?
@@ -52,7 +50,7 @@
%h5 The diff was not included because it is too large.
- else
%h4 Changes:
- - diff_files.each do |diff_file|
+ - @message.diffs.each do |diff_file|
- file_hash = hexdigest(diff_file.file_path)
%li{ id: file_hash }
%a{ href: @message.target_url + "##{file_hash}" }<
diff --git a/lib/gitlab/diff/file_collection/base.rb b/lib/gitlab/diff/file_collection/base.rb
index 7330f3377e1..36a7f26e83f 100644
--- a/lib/gitlab/diff/file_collection/base.rb
+++ b/lib/gitlab/diff/file_collection/base.rb
@@ -2,7 +2,7 @@ module Gitlab
module Diff
module FileCollection
class Base
- attr_reader :project, :diff_options, :diff_view, :diff_refs, :fallback_diff_refs
+ attr_reader :project, :diff_options, :diff_refs, :fallback_diff_refs
delegate :count, :size, :real_size, to: :diff_files