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
Léo-Paul Géneau
gitlab-ce
Commits
86d39016
Commit
86d39016
authored
Jun 06, 2018
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving rev-list lfs options to Lfschanges
parent
fddcfae6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
lib/gitlab/git/lfs_changes.rb
lib/gitlab/git/lfs_changes.rb
+3
-1
lib/gitlab/git/rev_list.rb
lib/gitlab/git/rev_list.rb
+2
-2
spec/lib/gitlab/git/rev_list_spec.rb
spec/lib/gitlab/git/rev_list_spec.rb
+1
-1
No files found.
lib/gitlab/git/lfs_changes.rb
View file @
86d39016
...
@@ -39,7 +39,9 @@ module Gitlab
...
@@ -39,7 +39,9 @@ module Gitlab
end
end
def
git_all_pointers
def
git_all_pointers
rev_list
.
all_objects
(
require_path:
true
)
do
|
object_ids
|
params
=
{
options:
[
"--filter=blob:limit=
#{
Gitlab
::
Git
::
Blob
::
LFS_POINTER_MAX_SIZE
}
"
],
require_path:
true
}
rev_list
.
all_objects
(
params
)
do
|
object_ids
|
Gitlab
::
Git
::
Blob
.
batch_lfs_pointers
(
@repository
,
object_ids
)
Gitlab
::
Git
::
Blob
.
batch_lfs_pointers
(
@repository
,
object_ids
)
end
end
end
end
...
...
lib/gitlab/git/rev_list.rb
View file @
86d39016
...
@@ -37,9 +37,9 @@ module Gitlab
...
@@ -37,9 +37,9 @@ module Gitlab
get_objects
(
opts
,
&
lazy_block
)
get_objects
(
opts
,
&
lazy_block
)
end
end
def
all_objects
(
require_path:
nil
,
&
lazy_block
)
def
all_objects
(
options:
[],
require_path:
nil
,
&
lazy_block
)
get_objects
(
including: :all
,
get_objects
(
including: :all
,
options:
[
"--filter=blob:limit=
#{
Gitlab
::
Git
::
Blob
::
LFS_POINTER_MAX_SIZE
}
"
]
,
options:
options
,
require_path:
require_path
,
require_path:
require_path
,
&
lazy_block
)
&
lazy_block
)
end
end
...
...
spec/lib/gitlab/git/rev_list_spec.rb
View file @
86d39016
...
@@ -88,7 +88,7 @@ describe Gitlab::Git::RevList do
...
@@ -88,7 +88,7 @@ describe Gitlab::Git::RevList do
context
'#all_objects'
do
context
'#all_objects'
do
it
'fetches list of all pushed objects using rev-list'
do
it
'fetches list of all pushed objects using rev-list'
do
stub_popen_rev_list
(
'--all'
,
'--objects'
,
'--filter=blob:limit=200'
,
output:
"sha1
\n
sha2"
)
stub_popen_rev_list
(
'--all'
,
'--objects'
,
output:
"sha1
\n
sha2"
)
expect
{
|
b
|
rev_list
.
all_objects
(
&
b
)
}.
to
yield_with_args
(
%w[sha1 sha2]
)
expect
{
|
b
|
rev_list
.
all_objects
(
&
b
)
}.
to
yield_with_args
(
%w[sha1 sha2]
)
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