Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
23187d60
Commit
23187d60
authored
Oct 25, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed diff issue
parent
1d697880
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
app/views/commits/_text_file.html.haml
app/views/commits/_text_file.html.haml
+10
-4
No files found.
app/views/commits/_text_file.html.haml
View file @
23187d60
-
line_old
=
0
-
line_new
=
0
-
lines_arr
=
diff
.
diff
.
lines
.
to_a
-
line_old
=
lines_arr
[
2
].
match
(
/-(\d)/
)[
0
].
to_i
.
abs
rescue
0
-
line_new
=
lines_arr
[
2
].
match
(
/\+(\d)/
)[
0
].
to_i
.
abs
rescue
0
-
lines
=
lines_arr
[
3
..-
1
].
join
-
lines
.
each_line
do
|
line
|
-
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment