diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-06-19 21:25:06 +0300 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-06-19 23:45:23 +0300 |
commit | 80b6a6e1f23674800c081f717186b5cb8e72c4cf (patch) | |
tree | a2187672355c4d41de3d8c0d56d78c884e73b2b2 /app/helpers | |
parent | a23e97664292468b57af1eee62382a27833f70c5 (diff) |
Merge branch 'dm-parallel-diff-unchanged-line-comment' into 'master'
Don't display comment on unchanged line on both sides in parallel diff
Closes #33864
See merge request !12275
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/diff_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index 2ae3a616933..87aff224187 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -66,12 +66,12 @@ module DiffHelper discussions_left = discussions_right = nil - if left && (left.unchanged? || left.discussable?) + if left && left.discussable? && (left.unchanged? || left.removed?) line_code = diff_file.line_code(left) discussions_left = @grouped_diff_discussions[line_code] end - if right&.discussable? + if right && right.discussable? && right.added? line_code = diff_file.line_code(right) discussions_right = @grouped_diff_discussions[line_code] end |