Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gpt
large_projects
gitlabhq1
Commits
8bafce90
Commit
8bafce90
authored
6 years ago
by
Ahmad Hassan
Browse files
Options
Download
Email Patches
Plain Diff
test
parent
694586fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
lib/gitlab/gitaly_client/repository_service.rb
lib/gitlab/gitaly_client/repository_service.rb
+24
-4
No files found.
lib/gitlab/gitaly_client/repository_service.rb
View file @
8bafce90
...
...
@@ -213,12 +213,32 @@ module Gitlab
end
def
create_from_bundle
(
bundle_path
)
gitaly_repo_stream_request
(
bundle_path
,
request
=
Gitaly
::
CreateRepositoryFromBundleRequest
.
new
(
repository:
@gitaly_repo
)
enum
=
Enumerator
.
new
do
|
y
|
File
.
open
(
bundle_path
,
'rb'
)
do
|
f
|
while
data
=
f
.
read
(
MAX_MSG_SIZE
)
request
.
data
=
data
y
.
yield
request
request
=
Gitaly
::
CreateRepositoryFromBundleRequest
.
new
end
end
end
GitalyClient
.
call
(
@storage
,
:repository_service
,
:create_repository_from_bundle
,
Gitaly
::
CreateRepositoryFromBundleRequest
,
Gitaly
.
default_timeout
enum
,
timeout:
Gitaly
.
default_timeout
)
# gitaly_repo_stream_request(
# bundle_path,
# :create_repository_from_bundle,
# Gitaly::CreateRepositoryFromBundleRequest,
# Gitaly.default_timeout
# )
end
def
restore_custom_hooks
(
custom_hooks_path
)
...
...
This diff is collapsed.
Click to expand it.
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