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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
49d9f224
Commit
49d9f224
authored
Mar 08, 2021
by
Robert May
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Further slight improvements
parent
c39609c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
lib/gitlab/blame.rb
lib/gitlab/blame.rb
+1
-5
lib/gitlab/git/blame.rb
lib/gitlab/git/blame.rb
+3
-2
No files found.
lib/gitlab/blame.rb
View file @
49d9f224
...
...
@@ -24,11 +24,7 @@ module Gitlab
current_group
=
{
commit:
commit
,
lines:
[]
}
end
current_group
[
:lines
]
<<
if
highlight
highlighted_lines
[
i
].
html_safe
else
line
end
current_group
[
:lines
]
<<
(
highlight
?
highlighted_lines
[
i
].
html_safe
:
line
)
prev_sha
=
commit
.
sha
i
+=
1
...
...
lib/gitlab/git/blame.rb
View file @
49d9f224
...
...
@@ -40,8 +40,9 @@ module Gitlab
elsif
m
=
/^(\w{40}) (\d+) (\d+)/
.
match
(
line
)
# Removed these instantiations for performance but keeping them for reference:
# commit_id, old_lineno, lineno = m[1], m[2].to_i, m[3].to_i
commits
[
m
[
1
]]
=
nil
unless
commits
.
key?
(
m
[
1
])
info
[
m
[
3
].
to_i
]
=
[
m
[
1
],
m
[
2
].
to_i
]
commit_id
=
m
[
1
]
commits
[
commit_id
]
=
nil
unless
commits
.
key?
(
commit_id
)
info
[
m
[
3
].
to_i
]
=
[
commit_id
,
m
[
2
].
to_i
]
end
end
...
...
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