summaryrefslogtreecommitdiff
path: root/app/helpers/diff_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/diff_helper.rb')
-rw-r--r--app/helpers/diff_helper.rb43
1 files changed, 0 insertions, 43 deletions
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb
index 2aabf0febdf..522593dd487 100644
--- a/app/helpers/diff_helper.rb
+++ b/app/helpers/diff_helper.rb
@@ -195,24 +195,6 @@ module DiffHelper
!diff_file.deleted_file? && @merge_request && @merge_request.source_project
end
- def diff_file_changed_icon(diff_file)
- if diff_file.deleted_file?
- "file-deletion"
- elsif diff_file.new_file?
- "file-addition"
- else
- "file-modified"
- end
- end
-
- def diff_file_changed_icon_color(diff_file)
- if diff_file.deleted_file?
- "danger"
- elsif diff_file.new_file?
- "success"
- end
- end
-
def render_overflow_warning?(diffs_collection)
diffs_collection.overflow?.tap do |overflown|
log_overflow_limits(diff_files: diffs_collection.raw_diff_files, collection_overflow: overflown)
@@ -272,23 +254,6 @@ module DiffHelper
toggle_whitespace_link(url, options)
end
- def diff_files_data(diff_files)
- diffs_map = diff_files.map do |f|
- {
- href: "##{hexdigest(f.file_path)}",
- title: f.new_path,
- name: f.file_path,
- path: diff_file_path_text(f),
- icon: diff_file_changed_icon(f),
- iconColor: "#{diff_file_changed_icon_color(f)}",
- added: f.added_lines,
- removed: f.removed_lines
- }
- end
-
- diffs_map.to_json
- end
-
def hide_whitespace?
params[:w] == '1'
end
@@ -302,14 +267,6 @@ module DiffHelper
link_to "#{hide_whitespace? ? 'Show' : 'Hide'} whitespace changes", url, class: options[:class]
end
- def diff_file_path_text(diff_file, max: 60)
- path = diff_file.new_path
-
- return path unless path.size > max && max > 3
-
- "...#{path[-(max - 3)..]}"
- end
-
def code_navigation_path(diffs)
Gitlab::CodeNavigationPath.new(merge_request.project, merge_request.diff_head_sha)
end