BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
cbd3ce8f
Unverified
Commit
cbd3ce8f
authored
Dec 14, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved lfs_blob_ids method into ExtractsPath module
parent
9c132216
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
tree_controller.rb
app/controllers/projects/tree_controller.rb
+1
-3
projects_controller.rb
app/controllers/projects_controller.rb
+0
-5
extracts_path.rb
lib/extracts_path.rb
+5
-0
No files found.
app/controllers/projects/tree_controller.rb
View file @
cbd3ce8f
...
...
@@ -26,10 +26,8 @@ class Projects::TreeController < Projects::ApplicationController
respond_to
do
|
format
|
format
.
html
do
blob_ids
=
tree
.
blobs
.
map
(
&
:id
)
lfs_blob_ids
@last_commit
=
@repository
.
last_commit_for_path
(
@commit
.
id
,
@tree
.
path
)
||
@commit
@lfs_blob_ids
=
Gitlab
::
Git
::
Blob
.
batch_lfs_pointers
(
@repo
,
blob_ids
).
map
(
&
:id
)
end
format
.
js
do
...
...
app/controllers/projects_controller.rb
View file @
cbd3ce8f
...
...
@@ -404,9 +404,4 @@ class ProjectsController < Projects::ApplicationController
#
redirect_to
request
.
original_url
.
sub
(
/\.git\/?\Z/
,
''
)
if
params
[
:format
]
==
'git'
end
def
lfs_blob_ids
blob_ids
=
tree
.
blobs
.
map
(
&
:id
)
@lfs_blob_ids
=
Gitlab
::
Git
::
Blob
.
batch_lfs_pointers
(
@repo
,
blob_ids
).
map
(
&
:id
)
end
end
lib/extracts_path.rb
View file @
cbd3ce8f
...
...
@@ -135,6 +135,11 @@ module ExtractsPath
@tree
||=
@repo
.
tree
(
@commit
.
id
,
@path
)
end
def
lfs_blob_ids
blob_ids
=
tree
.
blobs
.
map
(
&
:id
)
@lfs_blob_ids
=
Gitlab
::
Git
::
Blob
.
batch_lfs_pointers
(
@project
.
repository
,
blob_ids
).
map
(
&
:id
)
end
private
# overriden in subclasses, do not remove
...
...
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