Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-20 12:23:34 +0300
committerDouwe Maan <douwe@gitlab.com>2015-02-20 12:23:34 +0300
commit0632e85c82eeb76c9b61e497655c9cf2ef5dc262 (patch)
treeb078b750962b8bf8a2081a340bafe8e6253a032a /lib/gitlab/diff
parent6b0199ffc1c8e6a79b68a510052a1d1713afc29d (diff)
Fix commit comments on first line of diff not rendering in Merge Request Discussion view.
Diffstat (limited to 'lib/gitlab/diff')
-rw-r--r--lib/gitlab/diff/parser.rb2
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