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:
authorRubén Dávila <rdavila84@gmail.com>2016-03-16 03:51:27 +0300
committerRubén Dávila <rdavila84@gmail.com>2016-03-16 03:51:27 +0300
commit7e03b40221388bd0567be6609f2ededa7f934179 (patch)
tree2158edc267c768e6d109522a07f60978b3930167 /lib/gitlab/diff
parent64d0dd1807c75be21a8f5bfe3a74b9230b5b8979 (diff)
Return an empty Array when there aren't lines to parse.
Diffstat (limited to 'lib/gitlab/diff')
-rw-r--r--lib/gitlab/diff/parser.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/diff/parser.rb b/lib/gitlab/diff/parser.rb
index d0f6ba23ab4..d0815fc7eea 100644
--- a/lib/gitlab/diff/parser.rb
+++ b/lib/gitlab/diff/parser.rb
@@ -4,6 +4,8 @@ module Gitlab
include Enumerable
def parse(lines)
+ return [] if lines.blank?
+
@lines = lines
line_obj_index = 0
line_old = 1