diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-11-07 19:57:26 -0200 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-11-07 19:57:26 -0200 |
commit | 198402b38b59a43aa6e50259d7c13c0097dbdfac (patch) | |
tree | 972469d726a9fc38fa990ed6a5b29d9e91b409f6 /lib/gitlab/diff/position.rb | |
parent | 8467167bbc7fb16e25b202c6eda37a9fe1f1a9d7 (diff) | |
download | gitlab-ce-198402b38b59a43aa6e50259d7c13c0097dbdfac.tar.gz |
Revert "Merge branch 'osw-comment-on-any-line-on-diffs' into 'master'"osw-revert-comment-in-any-diff-line
This reverts commit a82a595728d54bdc12e51dfcfb22e9eddc449143, reversing
changes made to e7df959b8f99875edd246c7ac7779c3203e8755e.
Diffstat (limited to 'lib/gitlab/diff/position.rb')
-rw-r--r-- | lib/gitlab/diff/position.rb | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/gitlab/diff/position.rb b/lib/gitlab/diff/position.rb index 7bfab2d808f..f967494199e 100644 --- a/lib/gitlab/diff/position.rb +++ b/lib/gitlab/diff/position.rb @@ -101,10 +101,6 @@ module Gitlab @diff_refs ||= DiffRefs.new(base_sha: base_sha, start_sha: start_sha, head_sha: head_sha) end - def unfolded_diff?(repository) - diff_file(repository)&.unfolded? - end - def diff_file(repository) return @diff_file if defined?(@diff_file) @@ -138,13 +134,7 @@ module Gitlab return unless diff_refs.complete? return unless comparison = diff_refs.compare_in(repository.project) - file = comparison.diffs(diff_options).diff_files.first - - # We need to unfold diff lines according to the position in order - # to correctly calculate the line code and trace position changes. - file&.unfold_diff_lines(self) - - file + comparison.diffs(diff_options).diff_files.first end def get_formatter_class(type) |