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
5689e8a0
Commit
5689e8a0
authored
Aug 10, 2016
by
Paco Guzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid commit lookup on diff_helper
parent
023d4812
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
CHANGELOG
CHANGELOG
+1
-0
app/helpers/diff_helper.rb
app/helpers/diff_helper.rb
+2
-3
app/views/projects/diffs/_file.html.haml
app/views/projects/diffs/_file.html.haml
+1
-1
No files found.
CHANGELOG
View file @
5689e8a0
...
...
@@ -80,6 +80,7 @@ v 8.11.0 (unreleased)
- Sensible state specific default sort order for issues and merge requests !5453 (tomb0y)
- Fix RequestProfiler::Middleware error when code is reloaded in development
- Catch what warden might throw when profiling requests to re-throw it
- Avoid commit lookup on diff_helper passing existing local variable to the helper method
- Add description to new_issue email and new_merge_request_email in text/plain content type. !5663 (dixpac)
- Speed up and reduce memory usage of Commit#repo_changes, Repository#expire_avatar_cache and IrkerWorker
- Add unfold links for Side-by-Side view. !5415 (Tim Masliuchenko)
...
...
app/helpers/diff_helper.rb
View file @
5689e8a0
...
...
@@ -109,11 +109,10 @@ module DiffHelper
end
end
def
diff_file_html_data
(
project
,
diff_file
)
commit
=
commit_for_diff
(
diff_file
)
def
diff_file_html_data
(
project
,
diff_file_path
,
diff_commit_id
)
{
blob_diff_path:
namespace_project_blob_diff_path
(
project
.
namespace
,
project
,
tree_join
(
commit
.
id
,
diff_file
.
file_path
)),
tree_join
(
diff_commit_id
,
diff_
file_path
)),
view:
diff_view
}
end
...
...
app/views/projects/diffs/_file.html.haml
View file @
5689e8a0
.diff-file.file-holder
{
id:
"diff-#{index}"
,
data:
diff_file_html_data
(
project
,
diff_file
)}
.diff-file.file-holder
{
id:
"diff-#{index}"
,
data:
diff_file_html_data
(
project
,
diff_file
.
file_path
,
diff_commit
.
id
)}
.file-title
{
id:
"file-path-#{hexdigest(diff_file.file_path)}"
}
=
render
"projects/diffs/file_header"
,
diff_file:
diff_file
,
blob:
blob
,
diff_commit:
diff_commit
,
project:
project
,
url:
"#diff-
#{
index
}
"
...
...
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