summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-06-01 10:30:46 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-06-01 10:30:46 +0000
commitc1ee45953edac729bc43f676cfad3359f9b2a2f5 (patch)
treec6f3a8de12ea59f14ebeb0ff39c1f1bd5a4e152b /lib
parent8e4ba54aa44a5636684b2b99741e372d657d4316 (diff)
parentb417fc0329ec10ccbaa1c282893f8710ff81db9d (diff)
downloadgitlab-ce-c1ee45953edac729bc43f676cfad3359f9b2a2f5.tar.gz
Merge branch 'fix_diff_line_comments' into 'master'
Fix: A diff comment on a change at last line of a file shows as two comments in discussion Closes #32353 See merge request !11802
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/diff/line.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/diff/line.rb b/lib/gitlab/diff/line.rb
index 0a15c6d9358..bd52ae47e9f 100644
--- a/lib/gitlab/diff/line.rb
+++ b/lib/gitlab/diff/line.rb
@@ -59,6 +59,10 @@ module Gitlab
type == 'match'
end
+ def discussable?
+ !['match', 'new-nonewline', 'old-nonewline'].include?(type)
+ end
+
def as_json(opts = nil)
{
type: type,