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

_text_file.html.haml « commits « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: db71c387ecdf5bff42ed6ad8fc0230070c8bf6f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
- line_old = 0
- line_new = 0
- lines_arr = diff.diff.lines.to_a
- lines_arr.each do |line|
  - next if line.match(/^--- a/)
  - next if line.match(/^\+\+\+ b/)
  - if line.match(/^@@ -/)
    - 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

  = diff_line(line, line_new, line_old)
  - if line[0] == "+"
    - line_new += 1
  - elsif
    - line[0] == "-"
    - line_old += 1
  - else
    - line_new += 1
    - line_old += 1