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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
0632e85c
Commit
0632e85c
authored
Feb 20, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix commit comments on first line of diff not rendering in Merge Request Discussion view.
parent
6b0199ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
CHANGELOG
CHANGELOG
+1
-0
app/models/note.rb
app/models/note.rb
+9
-9
lib/gitlab/diff/parser.rb
lib/gitlab/diff/parser.rb
+1
-1
No files found.
CHANGELOG
View file @
0632e85c
v 7.9.0 (unreleased)
- Move labels/milestones tabs to sidebar
- Improve UI for commits, issues and merge request lists
- Fix commit comments on first line of diff not rendering in Merge Request Discussion view.
v 7.8.0 (unreleased)
- Replace highlight.js with rouge-fork rugments (Stefan Tatschner)
...
...
app/models/note.rb
View file @
0632e85c
...
...
@@ -409,19 +409,19 @@ class Note < ActiveRecord::Base
prev_lines
=
[]
diff_lines
.
each
do
|
line
|
if
generate_line_code
(
line
)
!=
self
.
line_code
if
line
.
type
==
"match"
prev_lines
.
clear
prev_match_line
=
line
else
prev_lines
.
push
(
line
)
prev_lines
.
shift
if
prev_lines
.
length
>=
max_number_of_lines
end
if
line
.
type
==
"match"
prev_lines
.
clear
prev_match_line
=
line
else
prev_lines
<<
line
return
prev_lines
break
if
generate_line_code
(
line
)
==
self
.
line_code
prev_lines
.
shift
if
prev_lines
.
length
>=
max_number_of_lines
end
end
prev_lines
end
def
diff_lines
...
...
lib/gitlab/diff/parser.rb
View file @
0632e85c
...
...
@@ -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
...
...
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