diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-20 10:23:34 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-20 10:23:34 +0100 |
commit | 0632e85c82eeb76c9b61e497655c9cf2ef5dc262 (patch) | |
tree | b078b750962b8bf8a2081a340bafe8e6253a032a /lib | |
parent | 6b0199ffc1c8e6a79b68a510052a1d1713afc29d (diff) | |
download | gitlab-ce-0632e85c82eeb76c9b61e497655c9cf2ef5dc262.tar.gz |
Fix commit comments on first line of diff not rendering in Merge Request Discussion view.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/diff/parser.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/diff/parser.rb b/lib/gitlab/diff/parser.rb index 887ed76b36c..c1d9520ddf1 100644 --- a/lib/gitlab/diff/parser.rb +++ b/lib/gitlab/diff/parser.rb @@ -27,7 +27,7 @@ module Gitlab line_old = line.match(/\-[0-9]*/)[0].to_i.abs rescue 0 line_new = line.match(/\+[0-9]*/)[0].to_i.abs rescue 0 - next if line_old == 1 && line_new == 1 #top of file + next if line_old <= 1 && line_new <= 1 #top of file lines_obj << Gitlab::Diff::Line.new(full_line, type, line_obj_index, line_old, line_new) line_obj_index += 1 next |