summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2017-05-30 23:38:06 +0300
committerValery Sizov <valery@gitlab.com>2017-05-31 18:38:10 +0300
commit563c1ca01cf94e125a5d01669e6e8455da257246 (patch)
treefc2c4dd7f85aee83c5574be87a3387afba959da5 /lib
parent52a3d4372c6e45e4ffb792a9fe7bfca84f3573a3 (diff)
downloadgitlab-ce-563c1ca01cf94e125a5d01669e6e8455da257246.tar.gz
Fix: A diff comment on a change at last line of a file shows as two comments in discussion
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,