diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-10-10 20:44:14 +0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-10-13 04:13:05 +0300 |
commit | 9fdde3693b3b49e929b7c80ccbec4abe412edb7f (patch) | |
tree | a0d6b1b4a21a2c2cc6d2322ecb410e08ef9103a4 /lib/gitlab/conflict | |
parent | faa9bd402d3521b3f7b4cc2583f8ef1b3cceb821 (diff) |
Move line code generation into Gitlab::Git
Having a distinct class just for that was a bit overkill
Diffstat (limited to 'lib/gitlab/conflict')
-rw-r--r-- | lib/gitlab/conflict/file.rb | 13 |
1 files changed, 1 insertions, 12 deletions
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) |