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
ed4b0f7a
Commit
ed4b0f7a
authored
Dec 18, 2018
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
69735dda
aa7c927e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
25 deletions
+8
-25
GITALY_SERVER_VERSION
GITALY_SERVER_VERSION
+1
-1
lib/gitlab/git/object_pool.rb
lib/gitlab/git/object_pool.rb
+0
-7
spec/lib/gitlab/git/object_pool_spec.rb
spec/lib/gitlab/git/object_pool_spec.rb
+7
-17
No files found.
GITALY_SERVER_VERSION
View file @
ed4b0f7a
1.
7
.0
1.
9
.0
lib/gitlab/git/object_pool.rb
View file @
ed4b0f7a
...
...
@@ -23,13 +23,6 @@ module Gitlab
end
def
link
(
to_link_repo
)
remote_name
=
to_link_repo
.
object_pool_remote_name
repository
.
set_config
(
"remote.
#{
remote_name
}
.url"
=>
relative_path_to
(
to_link_repo
.
relative_path
),
"remote.
#{
remote_name
}
.tagOpt"
=>
"--no-tags"
,
"remote.
#{
remote_name
}
.fetch"
=>
"+refs/*:refs/remotes/
#{
remote_name
}
/*"
)
object_pool_service
.
link_repository
(
to_link_repo
)
end
...
...
spec/lib/gitlab/git/object_pool_spec.rb
View file @
ed4b0f7a
...
...
@@ -56,16 +56,11 @@ describe Gitlab::Git::ObjectPool do
describe
'#link'
do
let!
(
:pool_repository
)
{
create
(
:pool_repository
,
:ready
)
}
context
'when
no remotes are set
'
do
context
'when
linked for the first time
'
do
it
'sets a remote'
do
expect
do
subject
.
link
(
source_repository
)
repo
=
Gitlab
::
GitalyClient
::
StorageSettings
.
allow_disk_access
do
Rugged
::
Repository
.
new
(
subject
.
repository
.
path
)
end
expect
(
repo
.
remotes
.
count
).
to
be
(
1
)
expect
(
repo
.
remotes
.
first
.
name
).
to
eq
(
source_repository
.
object_pool_remote_name
)
end
.
not_to
raise_error
end
end
...
...
@@ -75,14 +70,9 @@ describe Gitlab::Git::ObjectPool do
end
it
"doesn't raise an error"
do
expect
do
subject
.
link
(
source_repository
)
repo
=
Gitlab
::
GitalyClient
::
StorageSettings
.
allow_disk_access
do
Rugged
::
Repository
.
new
(
subject
.
repository
.
path
)
end
expect
(
repo
.
remotes
.
count
).
to
be
(
1
)
expect
(
repo
.
remotes
.
first
.
name
).
to
eq
(
source_repository
.
object_pool_remote_name
)
end
.
not_to
raise_error
end
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