summaryrefslogtreecommitdiff
path: root/app/views/projects/diffs/_parallel_view.html.haml
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-09-12 19:40:04 +0200
committerMarin Jankovski <marin@gitlab.com>2014-09-12 19:41:32 +0200
commite84861d510af63969a7ca09e4248426faf2dd345 (patch)
treea1f6a4a2ff4a15b8ea0d2e66d503f25351dfe50f /app/views/projects/diffs/_parallel_view.html.haml
parent5564fe31491a8a584b66feb6097742ec4025b8fa (diff)
downloadgitlab-ce-e84861d510af63969a7ca09e4248426faf2dd345.tar.gz
Remove unecesarry array operations.
Diffstat (limited to 'app/views/projects/diffs/_parallel_view.html.haml')
-rw-r--r--app/views/projects/diffs/_parallel_view.html.haml12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/views/projects/diffs/_parallel_view.html.haml b/app/views/projects/diffs/_parallel_view.html.haml
index 8abbba5b46d..3014e16bc7a 100644
--- a/app/views/projects/diffs/_parallel_view.html.haml
+++ b/app/views/projects/diffs/_parallel_view.html.haml
@@ -6,10 +6,10 @@
- line_number_left = line[1]
- line_content_left = line[2]
- line_code = line[3]
- - line_code_next = line[4]
- - type_right = line[5]
- - line_number_right = line[6]
- - line_content_right = line[7]
+ - type_right = line[4]
+ - line_number_right = line[5]
+ - line_content_right = line[6]
+ - line_code_right = line[7]
%tr.line_holder.parallel
- if type_left == 'match'
@@ -22,7 +22,7 @@
- if type_right == 'new'
- new_line_class = 'new'
- - new_line_code = line_code_next
+ - new_line_code = line_code_right
- else
- new_line_class = nil
- new_line_code = line_code
@@ -37,7 +37,7 @@
- else
- comments1 = line_comments[line_code]
- unless type_left.nil? && type_right.nil?
- - comments2 = line_comments[line_code_next]
+ - comments2 = line_comments[line_code_right]
- if comments1.present? || comments2.present?
= render "projects/notes/diff_notes_with_reply_parallel", notes1: comments1, notes2: comments2