From 9fdde3693b3b49e929b7c80ccbec4abe412edb7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Tue, 10 Oct 2017 14:44:14 -0300 Subject: Move line code generation into Gitlab::Git Having a distinct class just for that was a bit overkill --- lib/gitlab/conflict/file.rb | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'lib/gitlab/conflict') diff --git a/lib/gitlab/conflict/file.rb b/lib/gitlab/conflict/file.rb index 3392388a45f..2a0cb640a14 100644 --- a/lib/gitlab/conflict/file.rb +++ b/lib/gitlab/conflict/file.rb @@ -110,7 +110,7 @@ module Gitlab end def line_code(line) - Gitlab::Git::Conflict::LineCode.generate(our_path, line.new_pos, line.old_pos) + Gitlab::Git.diff_line_code(our_path, line.new_pos, line.old_pos) end def create_match_line(line) @@ -174,17 +174,6 @@ module Gitlab new_path: our_path) end - # Don't try to print merge_request. - def inspect - instance_variables = [:content, :their_path, :our_path, :our_mode, :type].map do |instance_variable| - value = instance_variable_get("@#{instance_variable}") - - "#{instance_variable}=\"#{value}\"" - end - - "#<#{self.class} #{instance_variables.join(' ')}>" - end - private def map_raw_lines(raw_lines) -- cgit v1.2.1